@nx/next 19.0.0-beta.7 → 19.0.0-beta.9
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/migrations.json +0 -40
- package/package.json +9 -9
- package/src/executors/build/lib/create-next-config-file.js +3 -3
- package/src/utils/create-cli-options.js +4 -1
- package/src/migrations/update-15-8-8/add-style-packages.d.ts +0 -3
- package/src/migrations/update-15-8-8/add-style-packages.js +0 -23
package/migrations.json
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
-
"add-style-packages": {
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"version": "15.8.8-beta.0",
|
|
6
|
-
"description": "Add less and stylus packages if used.",
|
|
7
|
-
"factory": "./src/migrations/update-15-8-8/add-style-packages"
|
|
8
|
-
},
|
|
9
3
|
"update-16-0-0-add-nx-packages": {
|
|
10
4
|
"cli": "nx",
|
|
11
5
|
"version": "16.0.0-beta.1",
|
|
@@ -32,40 +26,6 @@
|
|
|
32
26
|
}
|
|
33
27
|
},
|
|
34
28
|
"packageJsonUpdates": {
|
|
35
|
-
"15.0.4": {
|
|
36
|
-
"version": "15.0.4-beta.0",
|
|
37
|
-
"packages": {
|
|
38
|
-
"next": {
|
|
39
|
-
"version": "13.0.0",
|
|
40
|
-
"alwaysAddToPackageJson": false
|
|
41
|
-
},
|
|
42
|
-
"eslint-config-next": {
|
|
43
|
-
"version": "13.0.0",
|
|
44
|
-
"alwaysAddToPackageJson": false
|
|
45
|
-
},
|
|
46
|
-
"less-loader": {
|
|
47
|
-
"version": "11.1.0",
|
|
48
|
-
"alwaysAddToPackageJson": false
|
|
49
|
-
},
|
|
50
|
-
"stylus-loader": {
|
|
51
|
-
"version": "7.1.0",
|
|
52
|
-
"alwaysAddToPackageJson": false
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"15.4.5": {
|
|
57
|
-
"version": "15.4.5-beta.0",
|
|
58
|
-
"packages": {
|
|
59
|
-
"next": {
|
|
60
|
-
"version": "13.1.1",
|
|
61
|
-
"alwaysAddToPackageJson": false
|
|
62
|
-
},
|
|
63
|
-
"eslint-config-next": {
|
|
64
|
-
"version": "13.1.1",
|
|
65
|
-
"alwaysAddToPackageJson": false
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
29
|
"16.0.0": {
|
|
70
30
|
"version": "16.0.0-beta.0",
|
|
71
31
|
"packages": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/next",
|
|
3
|
-
"version": "19.0.0-beta.
|
|
3
|
+
"version": "19.0.0-beta.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"next": ">=14.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nx/devkit": "19.0.0-beta.
|
|
37
|
+
"@nx/devkit": "19.0.0-beta.9",
|
|
38
38
|
"@babel/plugin-proposal-decorators": "^7.22.7",
|
|
39
39
|
"@svgr/webpack": "^8.0.1",
|
|
40
40
|
"chalk": "^4.1.0",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"semver": "^7.5.3",
|
|
46
46
|
"tslib": "^2.3.0",
|
|
47
47
|
"webpack-merge": "^5.8.0",
|
|
48
|
-
"@nx/js": "19.0.0-beta.
|
|
49
|
-
"@nx/eslint": "19.0.0-beta.
|
|
50
|
-
"@nx/react": "19.0.0-beta.
|
|
51
|
-
"@nx/web": "19.0.0-beta.
|
|
52
|
-
"@nx/webpack": "19.0.0-beta.
|
|
53
|
-
"@nx/workspace": "19.0.0-beta.
|
|
54
|
-
"@nrwl/next": "19.0.0-beta.
|
|
48
|
+
"@nx/js": "19.0.0-beta.9",
|
|
49
|
+
"@nx/eslint": "19.0.0-beta.9",
|
|
50
|
+
"@nx/react": "19.0.0-beta.9",
|
|
51
|
+
"@nx/web": "19.0.0-beta.9",
|
|
52
|
+
"@nx/webpack": "19.0.0-beta.9",
|
|
53
|
+
"@nx/workspace": "19.0.0-beta.9",
|
|
54
|
+
"@nrwl/next": "19.0.0-beta.9"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
@@ -5,7 +5,7 @@ const devkit_1 = require("@nx/devkit");
|
|
|
5
5
|
const ts = require("typescript");
|
|
6
6
|
const fs_extra_1 = require("fs-extra");
|
|
7
7
|
const path_1 = require("path");
|
|
8
|
-
const
|
|
8
|
+
const js_1 = require("@nx/js");
|
|
9
9
|
function createNextConfigFile(options, context) {
|
|
10
10
|
// Don't overwrite the next.config.js file if output path is the same as the source path.
|
|
11
11
|
if (options.outputPath.replace(/\/$/, '') ===
|
|
@@ -57,7 +57,7 @@ function readSource(getFile) {
|
|
|
57
57
|
// Exported for testing
|
|
58
58
|
function getWithNxContent({ file, content } = readSource(() => (0, path_1.join)(__dirname, '../../../../plugins/with-nx.js'))) {
|
|
59
59
|
const withNxSource = ts.createSourceFile(file, content, ts.ScriptTarget.Latest, true);
|
|
60
|
-
const getWithNxContextDeclaration = (0,
|
|
60
|
+
const getWithNxContextDeclaration = (0, js_1.findNodes)(withNxSource, ts.SyntaxKind.FunctionDeclaration)?.find((node) => node.name?.text === 'getWithNxContext');
|
|
61
61
|
if (getWithNxContextDeclaration) {
|
|
62
62
|
content = (0, devkit_1.applyChangesToString)(content, [
|
|
63
63
|
{
|
|
@@ -122,7 +122,7 @@ exports.getRelativeFilesToCopy = getRelativeFilesToCopy;
|
|
|
122
122
|
// Exported for testing
|
|
123
123
|
function getRelativeImports({ file, content, }) {
|
|
124
124
|
const source = ts.createSourceFile(file, content, ts.ScriptTarget.Latest, true);
|
|
125
|
-
const callExpressionsOrImportDeclarations = (0,
|
|
125
|
+
const callExpressionsOrImportDeclarations = (0, js_1.findNodes)(source, [
|
|
126
126
|
ts.SyntaxKind.CallExpression,
|
|
127
127
|
ts.SyntaxKind.ImportDeclaration,
|
|
128
128
|
]);
|
|
@@ -5,7 +5,10 @@ function createCliOptions(obj) {
|
|
|
5
5
|
return Object.entries(obj).reduce((arr, [key, value]) => {
|
|
6
6
|
if (value !== undefined) {
|
|
7
7
|
const kebabCase = key.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase());
|
|
8
|
-
|
|
8
|
+
if (value === true || typeof value !== 'boolean') {
|
|
9
|
+
// Boolean flags don't need a value (e.g. --debug)
|
|
10
|
+
arr.push(`--${kebabCase}` + (typeof value !== 'boolean' ? `=${value}` : ''));
|
|
11
|
+
}
|
|
9
12
|
}
|
|
10
13
|
return arr;
|
|
11
14
|
}, []);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.update = void 0;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
async function update(tree) {
|
|
6
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
7
|
-
const missingDeps = {};
|
|
8
|
-
for (const [, config] of projects) {
|
|
9
|
-
if (config.targets?.build?.executor === '@nrwl/next:build' &&
|
|
10
|
-
tree.exists((0, devkit_1.joinPathFragments)(config.root, 'next.config.js'))) {
|
|
11
|
-
const nextConfigContent = tree.read((0, devkit_1.joinPathFragments)(config.root, 'next.config.js'), 'utf-8');
|
|
12
|
-
if (nextConfigContent.includes('@nrwl/next/plugins/with-less')) {
|
|
13
|
-
missingDeps['less'] = '3.12.2';
|
|
14
|
-
}
|
|
15
|
-
if (nextConfigContent.includes('@nrwl/next/plugins/with-stylus')) {
|
|
16
|
-
missingDeps['stylus'] = '^0.55.0';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, missingDeps);
|
|
21
|
-
}
|
|
22
|
-
exports.update = update;
|
|
23
|
-
exports.default = update;
|