@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.
@@ -1,6 +1,6 @@
1
1
  import type { RsbuildPlugin } from '@rsbuild/core';
2
- import type { Project } from './project';
3
- import { type ExtraMonorepoStrategies } from './project-utils';
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;
@@ -0,0 +1,2 @@
1
+ export * from './getDependentProjects.js';
2
+ export * from './filter.js';
@@ -1,4 +1,4 @@
1
- import type { INodePackageJson } from './types/packageJson';
1
+ import type { INodePackageJson } from './types/packageJson.js';
2
2
  export declare class Project {
3
3
  #private;
4
4
  name: 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.1-beta.9",
4
- "description": "Source build plugin of Rsbuild",
5
- "homepage": "https://rsbuild.dev",
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-types/index.d.ts",
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.cjs",
21
- "types": "./dist-types/index.d.ts",
22
- "files": [
23
- "dist",
24
- "dist-types"
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
- "typescript": "^5.5.2",
32
- "yaml": "^2.5.0",
33
- "@rsbuild/core": "1.0.1-beta.9",
34
- "@rsbuild/plugin-babel": "1.0.1-beta.9",
35
- "@scripts/test-helper": "1.0.1-beta.9"
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": "^1.0.1-beta.9"
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';
@@ -1,4 +0,0 @@
1
- export { PLUGIN_SOURCE_BUILD_NAME, pluginSourceBuild, type PluginSourceBuildOptions, } from './plugin';
2
- export { Project } from './project';
3
- export { getMonorepoBaseData, getMonorepoSubProjects } from './common';
4
- export type { MonorepoAnalyzer } from './types';
@@ -1 +0,0 @@
1
- {"//":"This file is for making TypeScript work with moduleResolution node16+.","version":"1.0.0"}
@@ -1,2 +0,0 @@
1
- export * from './getDependentProjects';
2
- export * from './filter';
File without changes
File without changes
File without changes
File without changes