@nx/web 16.0.0-beta.1
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/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +63 -0
- package/babel.d.ts +1 -0
- package/babel.js +7 -0
- package/babel.js.map +1 -0
- package/executors.json +46 -0
- package/generators.json +45 -0
- package/index.d.ts +3 -0
- package/index.js +10 -0
- package/index.js.map +1 -0
- package/migrations.json +90 -0
- package/package.json +47 -0
- package/src/executors/dev-server/compat.d.ts +2 -0
- package/src/executors/dev-server/compat.js +6 -0
- package/src/executors/dev-server/compat.js.map +1 -0
- package/src/executors/dev-server/dev-server.impl.d.ts +7 -0
- package/src/executors/dev-server/dev-server.impl.js +19 -0
- package/src/executors/dev-server/dev-server.impl.js.map +1 -0
- package/src/executors/dev-server/schema.json +81 -0
- package/src/executors/file-server/compat.d.ts +2 -0
- package/src/executors/file-server/compat.js +6 -0
- package/src/executors/file-server/compat.js.map +1 -0
- package/src/executors/file-server/file-server.impl.d.ts +8 -0
- package/src/executors/file-server/file-server.impl.js +181 -0
- package/src/executors/file-server/file-server.impl.js.map +1 -0
- package/src/executors/file-server/schema.d.ts +17 -0
- package/src/executors/file-server/schema.json +84 -0
- package/src/executors/rollup/compat.d.ts +2 -0
- package/src/executors/rollup/compat.js +6 -0
- package/src/executors/rollup/compat.js.map +1 -0
- package/src/executors/rollup/rollup.impl.d.ts +8 -0
- package/src/executors/rollup/rollup.impl.js +19 -0
- package/src/executors/rollup/rollup.impl.js.map +1 -0
- package/src/executors/rollup/schema.d.ts +29 -0
- package/src/executors/rollup/schema.json +153 -0
- package/src/executors/webpack/compat.d.ts +2 -0
- package/src/executors/webpack/compat.js +6 -0
- package/src/executors/webpack/compat.js.map +1 -0
- package/src/executors/webpack/schema.json +374 -0
- package/src/executors/webpack/webpack.impl.d.ts +7 -0
- package/src/executors/webpack/webpack.impl.js +19 -0
- package/src/executors/webpack/webpack.impl.js.map +1 -0
- package/src/generators/application/application.d.ts +5 -0
- package/src/generators/application/application.js +221 -0
- package/src/generators/application/application.js.map +1 -0
- package/src/generators/application/files/app-vite/.babelrc__tmpl__ +5 -0
- package/src/generators/application/files/app-vite/index.html__tmpl__ +16 -0
- package/src/generators/application/files/app-vite/public/favicon.ico +0 -0
- package/src/generators/application/files/app-vite/src/app/app.element.__style__ +416 -0
- package/src/generators/application/files/app-vite/src/app/app.element.spec.ts__tmpl__ +21 -0
- package/src/generators/application/files/app-vite/src/app/app.element.ts__tmpl__ +375 -0
- package/src/generators/application/files/app-vite/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/app-vite/src/main.ts__tmpl__ +1 -0
- package/src/generators/application/files/app-vite/src/styles.__style__ +1 -0
- package/src/generators/application/files/app-vite/tsconfig.app.json +9 -0
- package/src/generators/application/files/app-vite/tsconfig.json__tmpl__ +27 -0
- package/src/generators/application/files/app-webpack/.babelrc__tmpl__ +5 -0
- package/src/generators/application/files/app-webpack/src/app/app.element.__style__ +416 -0
- package/src/generators/application/files/app-webpack/src/app/app.element.spec.ts__tmpl__ +21 -0
- package/src/generators/application/files/app-webpack/src/app/app.element.ts__tmpl__ +375 -0
- package/src/generators/application/files/app-webpack/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/app-webpack/src/environments/environment.prod.ts__tmpl__ +3 -0
- package/src/generators/application/files/app-webpack/src/environments/environment.ts__tmpl__ +6 -0
- package/src/generators/application/files/app-webpack/src/favicon.ico +0 -0
- package/src/generators/application/files/app-webpack/src/index.html +14 -0
- package/src/generators/application/files/app-webpack/src/main.ts__tmpl__ +1 -0
- package/src/generators/application/files/app-webpack/src/styles.__style__ +1 -0
- package/src/generators/application/files/app-webpack/tsconfig.app.json +9 -0
- package/src/generators/application/files/app-webpack/tsconfig.json +10 -0
- package/src/generators/application/files/app-webpack/webpack.config.js__tmpl__ +8 -0
- package/src/generators/application/schema.d.ts +18 -0
- package/src/generators/application/schema.json +107 -0
- package/src/generators/init/init.d.ts +5 -0
- package/src/generators/init/init.js +57 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/schema.d.ts +8 -0
- package/src/generators/init/schema.json +45 -0
- package/src/generators/static-serve/schema.json +24 -0
- package/src/generators/static-serve/static-serve-configuration.d.ts +9 -0
- package/src/generators/static-serve/static-serve-configuration.js +72 -0
- package/src/generators/static-serve/static-serve-configuration.js.map +1 -0
- package/src/migrations/update-13-0-0/remove-deprecated-options-13-0-0.d.ts +2 -0
- package/src/migrations/update-13-0-0/remove-deprecated-options-13-0-0.js +34 -0
- package/src/migrations/update-13-0-0/remove-deprecated-options-13-0-0.js.map +1 -0
- package/src/migrations/update-13-0-0/remove-node-sass-13-0-0.d.ts +6 -0
- package/src/migrations/update-13-0-0/remove-node-sass-13-0-0.js +25 -0
- package/src/migrations/update-13-0-0/remove-node-sass-13-0-0.js.map +1 -0
- package/src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0.d.ts +2 -0
- package/src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0.js +33 -0
- package/src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0.js.map +1 -0
- package/src/migrations/update-13-3-0/rename-build-to-webpack.d.ts +2 -0
- package/src/migrations/update-13-3-0/rename-build-to-webpack.js +19 -0
- package/src/migrations/update-13-3-0/rename-build-to-webpack.js.map +1 -0
- package/src/migrations/update-13-3-0/rename-package-to-rollup.d.ts +2 -0
- package/src/migrations/update-13-3-0/rename-package-to-rollup.js +19 -0
- package/src/migrations/update-13-3-0/rename-package-to-rollup.js.map +1 -0
- package/src/migrations/update-13-8-0/add-postcss-config-option.d.ts +2 -0
- package/src/migrations/update-13-8-0/add-postcss-config-option.js +26 -0
- package/src/migrations/update-13-8-0/add-postcss-config-option.js.map +1 -0
- package/src/migrations/update-14-1-7/rollup-format-backwards-compatibility.d.ts +2 -0
- package/src/migrations/update-14-1-7/rollup-format-backwards-compatibility.js +23 -0
- package/src/migrations/update-14-1-7/rollup-format-backwards-compatibility.js.map +1 -0
- package/src/migrations/update-14-7-6/update-webpack-executor.d.ts +2 -0
- package/src/migrations/update-14-7-6/update-webpack-executor.js +27 -0
- package/src/migrations/update-14-7-6/update-webpack-executor.js.map +1 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +2 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.js +13 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.js.map +1 -0
- package/src/migrations/update-15-0-0/update-rollup-executor.d.ts +2 -0
- package/src/migrations/update-15-0-0/update-rollup-executor.js +38 -0
- package/src/migrations/update-15-0-0/update-rollup-executor.js.map +1 -0
- package/src/migrations/update-15-5-4/update-babel-preset.d.ts +2 -0
- package/src/migrations/update-15-5-4/update-babel-preset.js +37 -0
- package/src/migrations/update-15-5-4/update-babel-preset.js.map +1 -0
- package/src/migrations/update-15-9-1/add-dropped-dependencies.d.ts +2 -0
- package/src/migrations/update-15-9-1/add-dropped-dependencies.js +40 -0
- package/src/migrations/update-15-9-1/add-dropped-dependencies.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/plugins/webpack-nx-build-coordination-plugin.d.ts +1 -0
- package/src/plugins/webpack-nx-build-coordination-plugin.js +6 -0
- package/src/plugins/webpack-nx-build-coordination-plugin.js.map +1 -0
- package/src/utils/fs.d.ts +1 -0
- package/src/utils/fs.js +5 -0
- package/src/utils/fs.js.map +1 -0
- package/src/utils/normalize.d.ts +1 -0
- package/src/utils/normalize.js +5 -0
- package/src/utils/normalize.js.map +1 -0
- package/src/utils/versions.d.ts +4 -0
- package/src/utils/versions.js +8 -0
- package/src/utils/versions.js.map +1 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "NxWebInit",
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"title": "Init Web Plugin",
|
|
6
|
+
"description": "Init Web Plugin.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"bundler": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The bundler to use.",
|
|
12
|
+
"enum": ["webpack", "none", "vite"],
|
|
13
|
+
"default": "webpack"
|
|
14
|
+
},
|
|
15
|
+
"unitTestRunner": {
|
|
16
|
+
"description": "Adds the specified unit test runner",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["jest", "none"],
|
|
19
|
+
"default": "jest"
|
|
20
|
+
},
|
|
21
|
+
"e2eTestRunner": {
|
|
22
|
+
"description": "Adds the specified e2e test runner",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": ["cypress", "none"],
|
|
25
|
+
"default": "cypress"
|
|
26
|
+
},
|
|
27
|
+
"skipFormat": {
|
|
28
|
+
"description": "Skip formatting files",
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"default": false
|
|
31
|
+
},
|
|
32
|
+
"skipPackageJson": {
|
|
33
|
+
"description": "Do not add dependencies to `package.json`.",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": false,
|
|
36
|
+
"x-priority": "internal"
|
|
37
|
+
},
|
|
38
|
+
"skipBabelConfig": {
|
|
39
|
+
"description": "Do not generate a root babel.config.json (if babel is not needed).",
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"default": false
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"required": []
|
|
45
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "NxWebStaticServe",
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"title": "Static Serve Configuration",
|
|
6
|
+
"description": "Add a new serve target to serve a build apps static files. This allows for faster serving of the static build files by reusing the case. Helpful when reserving the app over and over again like in e2e tests.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"buildTarget": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Name of the build target to serve"
|
|
12
|
+
},
|
|
13
|
+
"outputPath": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Path to the directory of the built files. This is only needed if buildTarget doesn't specify an outputPath executor option."
|
|
16
|
+
},
|
|
17
|
+
"targetName": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Name of the serve target to add. Defaults to 'serve-static'.",
|
|
20
|
+
"default": "serve-static"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": ["buildTarget"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
interface WebStaticServeSchema {
|
|
3
|
+
buildTarget: string;
|
|
4
|
+
outputPath?: string;
|
|
5
|
+
targetName?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function webStaticServeGenerator(tree: Tree, options: WebStaticServeSchema): void;
|
|
8
|
+
export declare const compat: (generatorOptions: WebStaticServeSchema) => (tree: any, context: any) => Promise<any>;
|
|
9
|
+
export default webStaticServeGenerator;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compat = exports.webStaticServeGenerator = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function webStaticServeGenerator(tree, options) {
|
|
6
|
+
const opts = normalizeOptions(tree, options);
|
|
7
|
+
addStaticConfig(tree, opts);
|
|
8
|
+
}
|
|
9
|
+
exports.webStaticServeGenerator = webStaticServeGenerator;
|
|
10
|
+
function normalizeOptions(tree, options) {
|
|
11
|
+
var _a, _b, _c, _d;
|
|
12
|
+
const target = (0, devkit_1.parseTargetString)(options.buildTarget);
|
|
13
|
+
const opts = Object.assign(Object.assign({}, options), { targetName: options.targetName || 'serve-static', projectName: target.project });
|
|
14
|
+
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, target.project);
|
|
15
|
+
const buildTargetConfig = (_a = projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.targets) === null || _a === void 0 ? void 0 : _a[target.target];
|
|
16
|
+
if (!buildTargetConfig) {
|
|
17
|
+
throw new Error((0, devkit_1.stripIndents) `Unable to read the target configuration for the provided build target, ${opts.buildTarget}
|
|
18
|
+
Are you sure this target exists?`);
|
|
19
|
+
}
|
|
20
|
+
if (projectConfig.targets[opts.targetName]) {
|
|
21
|
+
throw new Error((0, devkit_1.stripIndents) `Project ${target.project} already has a '${opts.targetName}' target configured.
|
|
22
|
+
Either rename or remove the existing '${opts.targetName}' target and try again.
|
|
23
|
+
Optionally, you can provide a different name with the --target-name option other than '${opts.targetName}'`);
|
|
24
|
+
}
|
|
25
|
+
// NOTE: @nrwl/web:file-server only looks for the outputPath option
|
|
26
|
+
if (!((_b = buildTargetConfig.options) === null || _b === void 0 ? void 0 : _b.outputPath) && !opts.outputPath) {
|
|
27
|
+
// attempt to find the suiteable path from the outputs
|
|
28
|
+
let maybeOutputValue;
|
|
29
|
+
for (const o of (buildTargetConfig === null || buildTargetConfig === void 0 ? void 0 : buildTargetConfig.outputs) || []) {
|
|
30
|
+
const isInterpolatedOutput = o.trim().startsWith('{options.');
|
|
31
|
+
if (!isInterpolatedOutput) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const noBracketParts = o.replace(/[{}]/g, '').split('.');
|
|
35
|
+
if (noBracketParts.length === 2 && (noBracketParts === null || noBracketParts === void 0 ? void 0 : noBracketParts[1])) {
|
|
36
|
+
const key = noBracketParts[1].trim();
|
|
37
|
+
const value = (_c = buildTargetConfig.options) === null || _c === void 0 ? void 0 : _c[key];
|
|
38
|
+
if (value) {
|
|
39
|
+
maybeOutputValue = value;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// NOTE: outputDir is the storybook option.
|
|
45
|
+
opts.outputPath = ((_d = buildTargetConfig.options) === null || _d === void 0 ? void 0 : _d.outputDir) || maybeOutputValue;
|
|
46
|
+
if (opts.outputPath) {
|
|
47
|
+
devkit_1.logger.warn(`Automatically detected the output path to be ${opts.outputPath}.
|
|
48
|
+
If this is incorrect, the update the staticFilePath option in the ${target.project}:${opts.targetName} target configuration`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
devkit_1.logger.warn((0, devkit_1.stripIndents) `${opts.buildTarget} did not have an outputPath property set and --output-path was not provided.
|
|
52
|
+
Without either options, the static serve will most likely be unable to serve your project.
|
|
53
|
+
It's recommend to provide a --output-path option in this case.`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return opts;
|
|
57
|
+
}
|
|
58
|
+
function addStaticConfig(tree, opts) {
|
|
59
|
+
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, opts.projectName);
|
|
60
|
+
const staticServeOptions = {
|
|
61
|
+
executor: '@nrwl/web:file-server',
|
|
62
|
+
options: {
|
|
63
|
+
buildTarget: opts.buildTarget,
|
|
64
|
+
staticFilePath: opts.outputPath,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
projectConfig.targets[opts.targetName] = staticServeOptions;
|
|
68
|
+
(0, devkit_1.updateProjectConfiguration)(tree, opts.projectName, projectConfig);
|
|
69
|
+
}
|
|
70
|
+
exports.compat = (0, devkit_1.convertNxGenerator)(webStaticServeGenerator);
|
|
71
|
+
exports.default = webStaticServeGenerator;
|
|
72
|
+
//# sourceMappingURL=static-serve-configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-serve-configuration.js","sourceRoot":"","sources":["../../../../../../packages/web/src/generators/static-serve/static-serve-configuration.ts"],"names":[],"mappings":";;;AAAA,uCASoB;AAapB,SAAgB,uBAAuB,CACrC,IAAU,EACV,OAA6B;IAE7B,MAAM,I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AC,WAAW;YAC7B,cAAc,EAAE,IAAI,CAAC,UAAU;SAChC;KACF,CAAC;IAEF,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,kBAAkB,CAAC;IAE5D,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AACpE,CAAC;AAEY,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,uBAAuB,CAAC,CAAC;AAClE,kBAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const deprecatedOptions = ['showCircularDependencies', 'budgets'];
|
|
6
|
+
function update(host) {
|
|
7
|
+
var _a, _b, _c;
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
|
+
const projects = (0, devkit_1.getProjects)(host);
|
|
10
|
+
for (const [name, config] of projects.entries()) {
|
|
11
|
+
if (config.targets.build.executor !== '@nrwl/web:build')
|
|
12
|
+
return;
|
|
13
|
+
for (const opt of deprecatedOptions) {
|
|
14
|
+
let updated = false;
|
|
15
|
+
if (typeof ((_c = (_b = (_a = config.targets.build) === null || _a === void 0 ? void 0 : _a.configurations) === null || _b === void 0 ? void 0 : _b.production) === null || _c === void 0 ? void 0 : _c[opt]) !==
|
|
16
|
+
'undefined') {
|
|
17
|
+
delete config.targets.build.configurations.production[opt];
|
|
18
|
+
updated = true;
|
|
19
|
+
}
|
|
20
|
+
if (typeof config.targets.build.options[opt] !== 'undefined') {
|
|
21
|
+
delete config.targets.build.options[opt];
|
|
22
|
+
updated = true;
|
|
23
|
+
}
|
|
24
|
+
if (updated) {
|
|
25
|
+
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
26
|
+
devkit_1.logger.info(`NX Removed legacy build option from "${name}": ${opt}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
yield (0, devkit_1.formatFiles)(host);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
exports.default = update;
|
|
34
|
+
//# sourceMappingURL=remove-deprecated-options-13-0-0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-deprecated-options-13-0-0.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-13-0-0/remove-deprecated-options-13-0-0.ts"],"names":[],"mappings":";;;AAAA,uCAMoB;AAEpB,MAAM,iBAAiB,GAAG,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC;AAElE,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC/C,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,KAAK,iBAAiB;gBAAE,OAAO;YAEhE,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE;gBACnC,IAAI,OAAO,GAAG,KAAK,CAAC;gBACpB,IACE,OAAO,CAAA,MAAA,MAAA,MAAA,MAAM,CAAC,OAAO,CAAC,KAAK,0CAAE,cAAc,0CAAE,UAAU,0CAAG,GAAG,CAAC,CAAA;oBAC9D,WAAW,EACX;oBACA,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;oBAC3D,OAAO,GAAG,IAAI,CAAC;iBAChB;gBACD,IAAI,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,WAAW,EAAE;oBAC5D,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;oBACzC,OAAO,GAAG,IAAI,CAAC;iBAChB;gBAED,IAAI,OAAO,EAAE;oBACX,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;oBAC/C,eAAM,CAAC,IAAI,CAAC,wCAAwC,IAAI,MAAM,GAAG,EAAE,CAAC,CAAC;iBACtE;aACF;SACF;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AA5BD,yBA4BC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
|
+
/**
|
|
3
|
+
* For web/react apps with style scss option, remove node-sass sine it is deprecated.
|
|
4
|
+
* We already include sass package in `@nrwl/web` deps so no need to install anything extra.
|
|
5
|
+
*/
|
|
6
|
+
export default function update(tree: Tree): Promise<GeneratorCallback>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
/**
|
|
6
|
+
* For web/react apps with style scss option, remove node-sass sine it is deprecated.
|
|
7
|
+
* We already include sass package in `@nrwl/web` deps so no need to install anything extra.
|
|
8
|
+
*/
|
|
9
|
+
function update(tree) {
|
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
+
const packageJson = (0, devkit_1.readJson)(tree, 'package.json');
|
|
12
|
+
let task = undefined;
|
|
13
|
+
if (packageJson.devDependencies['node-sass']) {
|
|
14
|
+
task = (0, devkit_1.removeDependenciesFromPackageJson)(tree, [], ['node-sass']);
|
|
15
|
+
}
|
|
16
|
+
if (packageJson.dependencies['node-sass']) {
|
|
17
|
+
task = (0, devkit_1.removeDependenciesFromPackageJson)(tree, ['node-sass'], []);
|
|
18
|
+
}
|
|
19
|
+
if (task)
|
|
20
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
21
|
+
return task;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.default = update;
|
|
25
|
+
//# sourceMappingURL=remove-node-sass-13-0-0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-node-sass-13-0-0.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-13-0-0/remove-node-sass-13-0-0.ts"],"names":[],"mappings":";;;AAAA,uCAMoB;AAEpB;;;GAGG;AACH,SAA8B,MAAM,CAAC,IAAU;;QAC7C,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QACnD,IAAI,IAAI,GAAkC,SAAS,CAAC;QAEpD,IAAI,WAAW,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE;YAC5C,IAAI,GAAG,IAAA,0CAAiC,EAAC,IAAI,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;SACnE;QAED,IAAI,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE;YACzC,IAAI,GAAG,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;SACnE;QAED,IAAI,IAAI;YAAE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAElC,OAAO,IAAI,CAAC;IACd,CAAC;CAAA;AAfD,yBAeC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const packages = [
|
|
6
|
+
'webpack',
|
|
7
|
+
'copy-webpack-plugin',
|
|
8
|
+
'webpack-merge',
|
|
9
|
+
'webpack-node-externals',
|
|
10
|
+
'mini-css-extract-plugin',
|
|
11
|
+
'source-map-loader',
|
|
12
|
+
'terser-webpack-plugin',
|
|
13
|
+
'webpack-dev-server',
|
|
14
|
+
'webpack-sources',
|
|
15
|
+
'react-refresh',
|
|
16
|
+
'@pmmmwh/react-refresh-webpack-plugin',
|
|
17
|
+
];
|
|
18
|
+
function update(tree) {
|
|
19
|
+
var _a;
|
|
20
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const packageJson = (0, devkit_1.readJson)(tree, 'package.json');
|
|
22
|
+
let task = undefined;
|
|
23
|
+
// Undo the install by `nx g @nrwl/web:webpack5` in Nx 12.
|
|
24
|
+
if (((_a = packageJson.devDependencies['webpack']) === null || _a === void 0 ? void 0 : _a.match(/^([\^~])?5\./)) &&
|
|
25
|
+
packages.every((p) => packageJson.devDependencies[p])) {
|
|
26
|
+
task = (0, devkit_1.removeDependenciesFromPackageJson)(tree, [], packages);
|
|
27
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
28
|
+
}
|
|
29
|
+
return task;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.default = update;
|
|
33
|
+
//# sourceMappingURL=remove-webpack-5-packages-13-0-0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-webpack-5-packages-13-0-0.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0.ts"],"names":[],"mappings":";;;AAAA,uCAMoB;AAEpB,MAAM,QAAQ,GAAG;IACf,SAAS;IACT,qBAAqB;IACrB,eAAe;IACf,wBAAwB;IACxB,yBAAyB;IACzB,mBAAmB;IACnB,uBAAuB;IACvB,oBAAoB;IACpB,iBAAiB;IACjB,eAAe;IACf,sCAAsC;CACvC,CAAC;AAEF,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QACnD,IAAI,IAAI,GAAkC,SAAS,CAAC;QAEpD,0DAA0D;QAC1D,IACE,CAAA,MAAA,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,0CAAE,KAAK,CAAC,cAAc,CAAC;YAC7D,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EACrD;YACA,IAAI,GAAG,IAAA,0CAAiC,EAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;YAC7D,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAI,CAAC;;CACb;AAdD,yBAcC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function update(host) {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(host);
|
|
9
|
+
for (const [name, config] of projects.entries()) {
|
|
10
|
+
if (((_b = (_a = config === null || config === void 0 ? void 0 : config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) !== '@nrwl/web:build')
|
|
11
|
+
continue;
|
|
12
|
+
config.targets.build.executor = '@nrwl/web:webpack';
|
|
13
|
+
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
14
|
+
}
|
|
15
|
+
yield (0, devkit_1.formatFiles)(host);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.default = update;
|
|
19
|
+
//# sourceMappingURL=rename-build-to-webpack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rename-build-to-webpack.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-13-3-0/rename-build-to-webpack.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAEpB,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC/C,IAAI,CAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,iBAAiB;gBAAE,SAAS;YAErE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,mBAAmB,CAAC;YAEpD,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAZD,yBAYC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function update(host) {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(host);
|
|
9
|
+
for (const [name, config] of projects.entries()) {
|
|
10
|
+
if (((_b = (_a = config === null || config === void 0 ? void 0 : config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) !== '@nrwl/web:package')
|
|
11
|
+
continue;
|
|
12
|
+
config.targets.build.executor = '@nrwl/web:rollup';
|
|
13
|
+
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
14
|
+
}
|
|
15
|
+
yield (0, devkit_1.formatFiles)(host);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.default = update;
|
|
19
|
+
//# sourceMappingURL=rename-package-to-rollup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rename-package-to-rollup.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-13-3-0/rename-package-to-rollup.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAEpB,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC/C,IAAI,CAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,mBAAmB;gBAAE,SAAS;YAEvE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,kBAAkB,CAAC;YAEnD,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAZD,yBAYC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
/*
|
|
6
|
+
* This migration ensures that the previous behavior of applying the app postcss config
|
|
7
|
+
* is carried over to Nx 13.8.0.
|
|
8
|
+
*/
|
|
9
|
+
function update(host) {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
const projects = (0, devkit_1.getProjects)(host);
|
|
13
|
+
for (const [name, config] of projects.entries()) {
|
|
14
|
+
if (((_b = (_a = config === null || config === void 0 ? void 0 : config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) !== '@nrwl/web:webpack')
|
|
15
|
+
continue;
|
|
16
|
+
const configPath = `${config.root}/postcss.config.js`;
|
|
17
|
+
if (host.exists(configPath)) {
|
|
18
|
+
config.targets.build.options.postcssConfig = configPath;
|
|
19
|
+
}
|
|
20
|
+
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
21
|
+
}
|
|
22
|
+
yield (0, devkit_1.formatFiles)(host);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exports.default = update;
|
|
26
|
+
//# sourceMappingURL=add-postcss-config-option.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-postcss-config-option.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-13-8-0/add-postcss-config-option.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAEpB;;;GAGG;AACH,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC/C,IAAI,CAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,mBAAmB;gBAAE,SAAS;YACvE,MAAM,UAAU,GAAG,GAAG,MAAM,CAAC,IAAI,oBAAoB,CAAC;YAEtD,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE;gBAC3B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,GAAG,UAAU,CAAC;aACzD;YAED,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAfD,yBAeC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
/*
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
function update(tree) {
|
|
9
|
+
var _a, _b, _c;
|
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
+
for (const [name, config] of (0, devkit_1.getProjects)(tree)) {
|
|
12
|
+
if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) !== '@nrwl/web:rollup')
|
|
13
|
+
continue;
|
|
14
|
+
if (Array.isArray((_c = config.targets.build.options) === null || _c === void 0 ? void 0 : _c.format))
|
|
15
|
+
continue;
|
|
16
|
+
config.targets.build.options = Object.assign(Object.assign({}, config.targets.build.options), { format: ['esm', 'cjs'] });
|
|
17
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
18
|
+
}
|
|
19
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
exports.default = update;
|
|
23
|
+
//# sourceMappingURL=rollup-format-backwards-compatibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollup-format-backwards-compatibility.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-14-1-7/rollup-format-backwards-compatibility.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAEpB;;GAEG;AACH,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,EAAE;YAC9C,IAAI,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,kBAAkB;gBAAE,SAAS;YACrE,IAAI,KAAK,CAAC,OAAO,CAAC,MAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,0CAAE,MAAM,CAAC;gBAAE,SAAS;YAElE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,mCACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,KAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,GACvB,CAAC;YAEF,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAChD;QACD,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAbD,yBAaC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function update(host) {
|
|
6
|
+
var _a, _b, _c, _d;
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(host);
|
|
9
|
+
for (const [name, config] of projects.entries()) {
|
|
10
|
+
let updated = false;
|
|
11
|
+
if (((_b = (_a = config === null || config === void 0 ? void 0 : config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/web:webpack') {
|
|
12
|
+
config.targets.build.executor = '@nrwl/webpack:webpack';
|
|
13
|
+
updated = true;
|
|
14
|
+
}
|
|
15
|
+
if (((_d = (_c = config === null || config === void 0 ? void 0 : config.targets) === null || _c === void 0 ? void 0 : _c.serve) === null || _d === void 0 ? void 0 : _d.executor) === '@nrwl/web:dev-server') {
|
|
16
|
+
config.targets.serve.executor = '@nrwl/webpack:dev-server';
|
|
17
|
+
updated = true;
|
|
18
|
+
}
|
|
19
|
+
if (updated) {
|
|
20
|
+
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
yield (0, devkit_1.formatFiles)(host);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.default = update;
|
|
27
|
+
//# sourceMappingURL=update-webpack-executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-webpack-executor.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-14-7-6/update-webpack-executor.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAEpB,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC/C,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,IAAI,CAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,mBAAmB,EAAE;gBAC5D,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,uBAAuB,CAAC;gBACxD,OAAO,GAAG,IAAI,CAAC;aAChB;YACD,IAAI,CAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,sBAAsB,EAAE;gBAC/D,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,0BAA0B,CAAC;gBAC3D,OAAO,GAAG,IAAI,CAAC;aAChB;YACD,IAAI,OAAO,EAAE;gBACX,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;aAChD;SACF;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAnBD,yBAmBC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const add_babel_inputs_1 = require("@nx/js/src/utils/add-babel-inputs");
|
|
6
|
+
function default_1(tree) {
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
(0, add_babel_inputs_1.addBabelInputs)(tree);
|
|
9
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
exports.default = default_1;
|
|
13
|
+
//# sourceMappingURL=add-babel-inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-babel-inputs.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-15-0-0/add-babel-inputs.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAC/C,wEAAmE;AAEnE,mBAA+B,IAAU;;QACvC,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;QACrB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAHD,4BAGC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function update(host) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(host);
|
|
9
|
+
for (const [name, config] of projects.entries()) {
|
|
10
|
+
let updated = false;
|
|
11
|
+
if (((_b = (_a = config === null || config === void 0 ? void 0 : config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/web:rollup') {
|
|
12
|
+
config.targets.build.executor = '@nrwl/rollup:rollup';
|
|
13
|
+
updated = true;
|
|
14
|
+
}
|
|
15
|
+
if ((_f = (_e = (_d = (_c = config === null || config === void 0 ? void 0 : config.targets) === null || _c === void 0 ? void 0 : _c.build) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e.formats) === null || _f === void 0 ? void 0 : _f.includes('umd')) {
|
|
16
|
+
config.targets.build.options.formats =
|
|
17
|
+
config.targets.build.options.formats.reduce((acc, x) => {
|
|
18
|
+
const format = x === 'umd' ? 'cjs' : x;
|
|
19
|
+
if (format === 'cjs') {
|
|
20
|
+
if (!acc.includes('cjs'))
|
|
21
|
+
acc.push(format);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
acc.push(format);
|
|
25
|
+
}
|
|
26
|
+
return acc;
|
|
27
|
+
}, []);
|
|
28
|
+
updated = true;
|
|
29
|
+
}
|
|
30
|
+
if (updated) {
|
|
31
|
+
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
yield (0, devkit_1.formatFiles)(host);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
exports.default = update;
|
|
38
|
+
//# sourceMappingURL=update-rollup-executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-rollup-executor.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-15-0-0/update-rollup-executor.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAEpB,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC/C,IAAI,OAAO,GAAG,KAAK,CAAC;YAEpB,IAAI,CAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,kBAAkB,EAAE;gBAC3D,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,qBAAqB,CAAC;gBACtD,OAAO,GAAG,IAAI,CAAC;aAChB;YAED,IAAI,MAAA,MAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,KAAK,0CAAE,OAAO,0CAAE,OAAO,0CAAE,QAAQ,CAAC,KAAK,CAAC,EAAE;gBAC7D,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO;oBAClC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;wBACrD,MAAM,MAAM,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;wBAEvC,IAAI,MAAM,KAAK,KAAK,EAAE;4BACpB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;gCAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;yBAC5C;6BAAM;4BACL,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;yBAClB;wBAED,OAAO,GAAG,CAAC;oBACb,CAAC,EAAE,EAAE,CAAC,CAAC;gBAET,OAAO,GAAG,IAAI,CAAC;aAChB;YAED,IAAI,OAAO,EAAE;gBACX,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;aAChD;SACF;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAlCD,yBAkCC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const versions_1 = require("../../utils/versions");
|
|
6
|
+
/* Updates @nrwl/web/babel to @nrwl/js/babel because web package is no longer necessary to use webpack/rollup + babel. */
|
|
7
|
+
function update(tree) {
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
|
+
// Add `@nrwl/js` in case it was missing before.
|
|
10
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
11
|
+
'@nrwl/js': versions_1.nxVersion,
|
|
12
|
+
});
|
|
13
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
14
|
+
projects.forEach((config, name) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const babelrcPath = (0, devkit_1.joinPathFragments)(config.root, '.babelrc');
|
|
17
|
+
if (!tree.exists(babelrcPath))
|
|
18
|
+
return;
|
|
19
|
+
const babelrc = (0, devkit_1.readJson)(tree, babelrcPath);
|
|
20
|
+
const idx = (_a = babelrc === null || babelrc === void 0 ? void 0 : babelrc.presets) === null || _a === void 0 ? void 0 : _a.findIndex((p) => typeof p === 'string'
|
|
21
|
+
? p === '@nrwl/web/babel'
|
|
22
|
+
: p[0] === '@nrwl/web/babel');
|
|
23
|
+
if (idx === -1)
|
|
24
|
+
return;
|
|
25
|
+
const preset = babelrc.presets[idx];
|
|
26
|
+
if (typeof preset === 'string') {
|
|
27
|
+
babelrc.presets.splice(idx, 1, '@nrwl/js/babel');
|
|
28
|
+
}
|
|
29
|
+
else if (Array.isArray(preset)) {
|
|
30
|
+
babelrc.presets.splice(idx, 1, ['@nrwl/js/babel', preset[1]]);
|
|
31
|
+
}
|
|
32
|
+
(0, devkit_1.writeJson)(tree, babelrcPath, babelrc);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
exports.default = update;
|
|
37
|
+
//# sourceMappingURL=update-babel-preset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-babel-preset.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-15-5-4/update-babel-preset.ts"],"names":[],"mappings":";;;AAAA,uCAOoB;AACpB,mDAAiD;AAEjD,yHAAyH;AACzH,SAA8B,MAAM,CAAC,IAAU;;QAC7C,gDAAgD;QAChD,IAAA,qCAA4B,EAC1B,IAAI,EACJ,EAAE,E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BAmCC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function addDroppedDependencies(tree) {
|
|
6
|
+
var _a, _b, _c, _d;
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
const devDependencies = {};
|
|
9
|
+
const droppedDependencies = [
|
|
10
|
+
'@nrwl/linter',
|
|
11
|
+
'@nrwl/cypress',
|
|
12
|
+
'@nrwl/jest',
|
|
13
|
+
'@nrwl/rollup',
|
|
14
|
+
];
|
|
15
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
16
|
+
for (const [_, projectConfiguration] of projects) {
|
|
17
|
+
for (const [_, targetConfiguration] of Object.entries((_a = projectConfiguration.targets) !== null && _a !== void 0 ? _a : {})) {
|
|
18
|
+
for (const droppedDependency of droppedDependencies) {
|
|
19
|
+
if ((_b = targetConfiguration.executor) === null || _b === void 0 ? void 0 : _b.startsWith(droppedDependency + ':')) {
|
|
20
|
+
devDependencies[droppedDependency] = devkit_1.NX_VERSION;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
26
|
+
for (const [_, targetConfiguration] of Object.entries((_c = nxJson === null || nxJson === void 0 ? void 0 : nxJson.targetDefaults) !== null && _c !== void 0 ? _c : {})) {
|
|
27
|
+
for (const droppedDependency of droppedDependencies) {
|
|
28
|
+
if ((_d = targetConfiguration.executor) === null || _d === void 0 ? void 0 : _d.startsWith(droppedDependency + ':')) {
|
|
29
|
+
devDependencies[droppedDependency] = devkit_1.NX_VERSION;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (Object.keys(devDependencies).length > 0) {
|
|
34
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies);
|
|
35
|
+
}
|
|
36
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
exports.default = addDroppedDependencies;
|
|
40
|
+
//# sourceMappingURL=add-dropped-dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-dropped-dependencies.js","sourceRoot":"","sources":["../../../../../../packages/web/src/migrations/update-15-9-1/add-dropped-dependencies.ts"],"names":[],"mappings":";;;AAAA,uCAOoB;AAEpB,SAA8B,sBAAsB,CAAC,IAAU;;;QAC7D,MAAM,eAAe,GAAG,EAAE,CAAC;QAC3B,MAAM,mBAAmB,GAAG;YAC1B,cAAc;YACd,eAAe;YACf,YAAY;YACZ,cAAc;SACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,MAAM,CAAC,CAAC,EAAE,oBAAoB,CAAC,IAAI,QAAQ,EAAE;YAChD,KAAK,MAAM,CAAC,CAAC,EAAE,mBAAmB,CAAC,IAAI,MAAM,CAAC,OAAO,CACnD,MAAA,oBAAoB,CAAC,OAAO,mCAAI,EAAE,CACnC,EAAE;gBACD,KAAK,MAAM,iBAAiB,IAAI,mBAAmB,EAAE;oBACnD,IAAI,MAAA,mBAAmB,CAAC,QAAQ,0CAAE,UAAU,CAAC,iBAAiB,GAAG,GAAG,CAAC,EAAE;wBACrE,eAAe,CAAC,iBAAiB,CAAC,GAAG,mBAAU,CAAC;qBACjD;iBACF;aACF;SACF;QAED,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,IAAI,CAAC,CAAC;QAEhC,KAAK,MAAM,CAAC,CAAC,EAAE,mBAAmB,CAAC,IAAI,MAAM,CAAC,OAAO,CACnD,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,cAAc,mCAAI,EAAE,CAC7B,EAAE;YACD,KAAK,MAAM,iBAAiB,IAAI,m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