@nx/js 0.0.0-pr-28808-eac89e6 → 0.0.0-pr-29122-4727ac1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/js",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-29122-4727ac1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
|
|
6
6
|
"repository": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@babel/preset-env": "^7.23.2",
|
|
40
40
|
"@babel/preset-typescript": "^7.22.5",
|
|
41
41
|
"@babel/runtime": "^7.22.6",
|
|
42
|
-
"@nx/devkit": "0.0.0-pr-
|
|
43
|
-
"@nx/workspace": "0.0.0-pr-
|
|
42
|
+
"@nx/devkit": "0.0.0-pr-29122-4727ac1",
|
|
43
|
+
"@nx/workspace": "0.0.0-pr-29122-4727ac1",
|
|
44
44
|
"@zkochan/js-yaml": "0.0.7",
|
|
45
45
|
"babel-plugin-const-enum": "^1.0.1",
|
|
46
46
|
"babel-plugin-macros": "^2.8.0",
|
|
@@ -135,6 +135,10 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
135
135
|
logNxReleaseDocsInfo();
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
+
// Always run install to link packages.
|
|
139
|
+
if (options.isUsingTsSolutionConfig) {
|
|
140
|
+
tasks.push(() => (0, devkit_1.installPackagesTask)(tree));
|
|
141
|
+
}
|
|
138
142
|
tasks.push(() => {
|
|
139
143
|
(0, log_show_project_command_1.logShowProjectCommand)(options.name);
|
|
140
144
|
});
|
|
@@ -816,6 +820,17 @@ function determineEntryFields(options) {
|
|
|
816
820
|
// Safest option is to not set a type field.
|
|
817
821
|
// Allow the user to decide which module format their library is using
|
|
818
822
|
type: undefined,
|
|
823
|
+
// For non-buildable libraries, point to source so we can still use them in apps via bundlers like Vite.
|
|
824
|
+
main: options.isUsingTsSolutionConfig
|
|
825
|
+
? options.js
|
|
826
|
+
? './src/index.js'
|
|
827
|
+
: './src/index.ts'
|
|
828
|
+
: undefined,
|
|
829
|
+
types: options.isUsingTsSolutionConfig
|
|
830
|
+
? options.js
|
|
831
|
+
? './src/index.js'
|
|
832
|
+
: './src/index.ts'
|
|
833
|
+
: undefined,
|
|
819
834
|
};
|
|
820
835
|
}
|
|
821
836
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ProjectNameAndRootFormat,
|
|
3
|
-
ProjectNameAndRootOptions,
|
|
4
|
-
} from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
1
|
+
import type { ProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
5
2
|
// nx-ignore-next-line
|
|
6
3
|
const { Linter, LinterType } = require('@nx/eslint'); // use require to import to avoid circular dependency
|
|
7
4
|
import type { ProjectPackageManagerWorkspaceState } from '../../utils/package-manager-workspaces';
|
|
@@ -12,7 +9,6 @@ export type Bundler = 'swc' | 'tsc' | 'rollup' | 'vite' | 'esbuild' | 'none';
|
|
|
12
9
|
export interface LibraryGeneratorSchema {
|
|
13
10
|
directory: string;
|
|
14
11
|
name?: string;
|
|
15
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
16
12
|
skipFormat?: boolean;
|
|
17
13
|
tags?: string;
|
|
18
14
|
skipTsConfig?: boolean;
|