Skip to content

Commit

Permalink
chore: bump Rslib 0.0.12 and adjust dirname/filename (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeless0911 authored Oct 15, 2024
1 parent fc152dd commit 10941c1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"memfs": "^4.14.0",
"picocolors": "1.1.0",
"prebundle": "1.2.2",
"rslib": "npm:@rslib/[email protected].11",
"rslib": "npm:@rslib/[email protected].12",
"rslog": "^1.2.3",
"tsconfck": "3.1.4",
"typescript": "^5.6.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rslib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@types/fs-extra": "^11.0.4",
"@types/node": "~18.19.39",
"fs-extra": "^11.2.0",
"rslib": "npm:@rslib/[email protected].11",
"rslib": "npm:@rslib/[email protected].12",
"typescript": "^5.6.3"
},
"engines": {
Expand Down
3 changes: 3 additions & 0 deletions packages/create-rslib/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import {
type Argv,
type ESLintTemplateName,
Expand All @@ -7,6 +8,8 @@ import {
select,
} from 'create-rstack';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

async function getTemplateName({ template }: Argv) {
if (typeof template === 'string') {
const pair = template.split('-');
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-dts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@microsoft/api-extractor": "^7.47.9",
"@rsbuild/core": "~1.0.14",
"@rslib/tsconfig": "workspace:*",
"rslib": "npm:@rslib/[email protected].11",
"rslib": "npm:@rslib/[email protected].12",
"typescript": "^5.6.3"
},
"peerDependencies": {
Expand Down
6 changes: 5 additions & 1 deletion packages/plugin-dts/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { fork } from 'node:child_process';
import { extname, join } from 'node:path';
import { dirname, extname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { type RsbuildConfig, type RsbuildPlugin, logger } from '@rsbuild/core';
import { processSourceEntry } from './utils';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

export type PluginDtsOptions = {
bundle?: boolean;
distPath?: string;
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 10941c1

Please sign in to comment.