@rsbuild/plugin-source-build 1.0.1-beta.9 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +233 -9
- package/README.zh-CN.md +241 -0
- package/{dist-types → dist}/common/getBaseData.d.ts +2 -2
- package/{dist-types → dist}/common/getProjects.d.ts +2 -2
- package/dist/common/index.d.ts +6 -0
- package/{dist-types → dist}/common/pnpm.d.ts +1 -1
- package/{dist-types → dist}/common/rush.d.ts +1 -1
- package/dist/index.cjs +445 -7781
- package/dist/index.d.ts +4 -0
- package/dist/index.js +358 -7866
- package/{dist-types → dist}/plugin.d.ts +2 -2
- package/{dist-types → dist}/project-utils/filter.d.ts +1 -1
- package/{dist-types → dist}/project-utils/getDependentProjects.d.ts +3 -3
- package/dist/project-utils/index.d.ts +2 -0
- package/{dist-types → dist}/project.d.ts +1 -1
- package/{dist-types → dist}/types/index.d.ts +4 -4
- package/{dist-types → dist}/utils.d.ts +1 -1
- package/package.json +50 -28
- package/dist-types/common/index.d.ts +0 -6
- package/dist-types/index.d.ts +0 -4
- package/dist-types/package.json +0 -1
- package/dist-types/project-utils/index.d.ts +0 -2
- /package/{dist-types → dist}/common/isMonorepo.d.ts +0 -0
- /package/{dist-types → dist}/constants.d.ts +0 -0
- /package/{dist-types → dist}/types/packageJson.d.ts +0 -0
- /package/{dist-types → dist}/types/rushJson.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
2
|
-
import type
|
|
3
|
-
import {
|
|
2
|
+
import { type ExtraMonorepoStrategies } from './project-utils/index.js';
|
|
3
|
+
import type { Project } from './project.js';
|
|
4
4
|
export declare const PLUGIN_SOURCE_BUILD_NAME = "rsbuild:source-build";
|
|
5
5
|
export declare const getSourceInclude: (options: {
|
|
6
6
|
projects: Project[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Project } from '../project';
|
|
1
|
+
import type { Project } from '../project.js';
|
|
2
2
|
export type Filter = FilterFunction;
|
|
3
3
|
export type FilterFunction = (projects: Project[]) => Project[] | Promise<Project[]>;
|
|
4
4
|
export declare const filterByField: (fieldName: string, checkExports?: boolean) => FilterFunction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Project } from '../project';
|
|
2
|
-
import type { MonorepoAnalyzer } from '../types';
|
|
3
|
-
import type { Filter } from './filter';
|
|
1
|
+
import type { Project } from '../project.js';
|
|
2
|
+
import type { MonorepoAnalyzer } from '../types/index.js';
|
|
3
|
+
import type { Filter } from './filter.js';
|
|
4
4
|
export type ExtraMonorepoStrategies = Record<string, MonorepoAnalyzer>;
|
|
5
5
|
export interface GetDependentProjectsOptions {
|
|
6
6
|
cwd?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { GetProjectsFunc } from '../common/getProjects';
|
|
2
|
-
import type { IsMonorepoFn } from '../common/isMonorepo';
|
|
3
|
-
export * from './packageJson';
|
|
4
|
-
export * from './rushJson';
|
|
1
|
+
import type { GetProjectsFunc } from '../common/getProjects.js';
|
|
2
|
+
import type { IsMonorepoFn } from '../common/isMonorepo.js';
|
|
3
|
+
export * from './packageJson.js';
|
|
4
|
+
export * from './rushJson.js';
|
|
5
5
|
export interface MonorepoAnalyzer {
|
|
6
6
|
check: IsMonorepoFn;
|
|
7
7
|
getProjects: GetProjectsFunc;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { INodePackageJson, IRushConfig } from './types';
|
|
1
|
+
import type { INodePackageJson, IRushConfig } from './types/index.js';
|
|
2
2
|
export declare const readPackageJson: (pkgJsonFilePath: string) => Promise<INodePackageJson>;
|
|
3
3
|
export declare const readRushJson: (rushJsonFilePath: string) => Promise<IRushConfig>;
|
|
4
4
|
export declare const readJson: <T>(jsonFileAbsPath: string) => Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,49 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-source-build",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "https://github.com/web-infra-dev/rsbuild",
|
|
9
|
-
"directory": "packages/plugin-source-build"
|
|
10
|
-
},
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "An Rsbuild plugin to provide support for monorepo source code referencing.",
|
|
5
|
+
"repository": "https://github.com/rspack-contrib/rsbuild-plugin-source-build",
|
|
11
6
|
"license": "MIT",
|
|
12
7
|
"type": "module",
|
|
13
8
|
"exports": {
|
|
14
9
|
".": {
|
|
15
|
-
"types": "./dist
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
16
11
|
"import": "./dist/index.js",
|
|
17
12
|
"require": "./dist/index.cjs"
|
|
18
13
|
}
|
|
19
14
|
},
|
|
20
|
-
"main": "./dist/index.
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"module": "./dist/index.mjs",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"files": ["dist"],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "rslib build",
|
|
21
|
+
"dev": "rslib build --watch",
|
|
22
|
+
"lint": "biome check .",
|
|
23
|
+
"lint:write": "biome check . --write",
|
|
24
|
+
"prepare": "simple-git-hooks && npm run build",
|
|
25
|
+
"test": "playwright test",
|
|
26
|
+
"bump": "npx bumpp"
|
|
27
|
+
},
|
|
28
|
+
"simple-git-hooks": {
|
|
29
|
+
"pre-commit": "npx nano-staged"
|
|
30
|
+
},
|
|
31
|
+
"nano-staged": {
|
|
32
|
+
"*.{js,jsx,ts,tsx,mjs,cjs}": [
|
|
33
|
+
"biome check --write --no-errors-on-unmatched"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
26
36
|
"dependencies": {
|
|
27
37
|
"fast-glob": "^3.3.2",
|
|
28
|
-
"json5": "^2.2.3"
|
|
38
|
+
"json5": "^2.2.3",
|
|
39
|
+
"yaml": "^2.6.1"
|
|
29
40
|
},
|
|
30
41
|
"devDependencies": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"@rsbuild/core": "1.
|
|
34
|
-
"@rsbuild/plugin-
|
|
35
|
-
"@
|
|
42
|
+
"@biomejs/biome": "^1.9.4",
|
|
43
|
+
"@playwright/test": "^1.49.0",
|
|
44
|
+
"@rsbuild/core": "^1.1.6",
|
|
45
|
+
"@rsbuild/plugin-react": "^1.0.7",
|
|
46
|
+
"@rsbuild/plugin-type-check": "^1.1.0",
|
|
47
|
+
"@rslib/core": "^0.1.1",
|
|
48
|
+
"@types/node": "^22.10.1",
|
|
49
|
+
"@types/react": "^18.3.12",
|
|
50
|
+
"@types/react-dom": "^18.3.1",
|
|
51
|
+
"nano-staged": "^0.8.0",
|
|
52
|
+
"playwright": "^1.49.0",
|
|
53
|
+
"react": "^18.3.1",
|
|
54
|
+
"react-dom": "^18.3.1",
|
|
55
|
+
"simple-git-hooks": "^2.11.1",
|
|
56
|
+
"typescript": "^5.7.2"
|
|
36
57
|
},
|
|
37
58
|
"peerDependencies": {
|
|
38
|
-
"@rsbuild/core": "
|
|
59
|
+
"@rsbuild/core": "1.x"
|
|
39
60
|
},
|
|
61
|
+
"peerDependenciesMeta": {
|
|
62
|
+
"@rsbuild/core": {
|
|
63
|
+
"optional": true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"packageManager": "pnpm@9.14.4",
|
|
40
67
|
"publishConfig": {
|
|
41
68
|
"access": "public",
|
|
42
|
-
"provenance": true,
|
|
43
69
|
"registry": "https://registry.npmjs.org/"
|
|
44
|
-
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"build": "modern build",
|
|
47
|
-
"dev": "modern build --watch"
|
|
48
70
|
}
|
|
49
|
-
}
|
|
71
|
+
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './getBaseData';
|
|
2
|
-
export * from './isMonorepo';
|
|
3
|
-
export { getMonorepoSubProjects } from './getProjects';
|
|
4
|
-
export { getProjects as getPnpmMonorepoSubProjects } from './pnpm';
|
|
5
|
-
export { getProjects as getRushMonorepoSubProjects } from './rush';
|
|
6
|
-
export type { GetProjectsFunc } from './getProjects';
|
package/dist-types/index.d.ts
DELETED
package/dist-types/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"//":"This file is for making TypeScript work with moduleResolution node16+.","version":"1.0.0"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|