Skip to content

Commit 10941c1

Browse files
authored
chore: bump Rslib 0.0.12 and adjust dirname/filename (#297)
1 parent fc152dd commit 10941c1

File tree

6 files changed

+26
-19
lines changed

6 files changed

+26
-19
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"memfs": "^4.14.0",
5151
"picocolors": "1.1.0",
5252
"prebundle": "1.2.2",
53-
"rslib": "npm:@rslib/[email protected].11",
53+
"rslib": "npm:@rslib/[email protected].12",
5454
"rslog": "^1.2.3",
5555
"tsconfck": "3.1.4",
5656
"typescript": "^5.6.3"

packages/create-rslib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@types/fs-extra": "^11.0.4",
3636
"@types/node": "~18.19.39",
3737
"fs-extra": "^11.2.0",
38-
"rslib": "npm:@rslib/[email protected].11",
38+
"rslib": "npm:@rslib/[email protected].12",
3939
"typescript": "^5.6.3"
4040
},
4141
"engines": {

packages/create-rslib/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from 'node:path';
2+
import { fileURLToPath } from 'node:url';
23
import {
34
type Argv,
45
type ESLintTemplateName,
@@ -7,6 +8,8 @@ import {
78
select,
89
} from 'create-rstack';
910

11+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
12+
1013
async function getTemplateName({ template }: Argv) {
1114
if (typeof template === 'string') {
1215
const pair = template.split('-');

packages/plugin-dts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@microsoft/api-extractor": "^7.47.9",
3838
"@rsbuild/core": "~1.0.14",
3939
"@rslib/tsconfig": "workspace:*",
40-
"rslib": "npm:@rslib/[email protected].11",
40+
"rslib": "npm:@rslib/[email protected].12",
4141
"typescript": "^5.6.3"
4242
},
4343
"peerDependencies": {

packages/plugin-dts/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import { fork } from 'node:child_process';
2-
import { extname, join } from 'node:path';
2+
import { dirname, extname, join } from 'node:path';
3+
import { fileURLToPath } from 'node:url';
34
import { type RsbuildConfig, type RsbuildPlugin, logger } from '@rsbuild/core';
45
import { processSourceEntry } from './utils';
56

7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = dirname(__filename);
9+
610
export type PluginDtsOptions = {
711
bundle?: boolean;
812
distPath?: string;

pnpm-lock.yaml

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)