@nrwl/next 13.10.2 → 14.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/README.md +1 -1
- package/migrations.json +19 -0
- package/package.json +8 -8
- package/src/executors/build/schema.json +1 -1
- package/src/executors/server/schema.json +1 -1
- package/src/generators/application/files/tsconfig.json__tmpl__ +0 -1
- package/src/generators/application/lib/add-jest.js +10 -1
- package/src/generators/application/lib/add-jest.js.map +1 -1
- package/src/generators/application/lib/add-project.js +6 -2
- package/src/generators/application/lib/add-project.js.map +1 -1
- package/src/generators/application/schema.json +1 -0
- package/src/generators/component/schema.json +1 -0
- package/src/migrations/update-14-0-0/add-default-development-configurations.d.ts +3 -0
- package/src/migrations/update-14-0-0/add-default-development-configurations.js +34 -0
- package/src/migrations/update-14-0-0/add-default-development-configurations.js.map +1 -0
- package/src/utils/versions.d.ts +2 -2
- package/src/utils/versions.js +3 -3
package/README.md
CHANGED
|
@@ -79,6 +79,6 @@ A few links to help you get started:
|
|
|
79
79
|
- [Official Nx YouTube Channel](https://www.youtube.com/c/Nrwl_io)
|
|
80
80
|
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
81
81
|
|
|
82
|
-
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
82
|
+
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
83
83
|
width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
|
|
84
84
|
|
package/migrations.json
CHANGED
|
@@ -78,6 +78,12 @@
|
|
|
78
78
|
"version": "13.0.3-beta.1",
|
|
79
79
|
"description": "Fix setup for less stylesheets",
|
|
80
80
|
"factory": "./src/migrations/update-13-0-3/fix-less"
|
|
81
|
+
},
|
|
82
|
+
"add-default-development-configurations-14.0.0": {
|
|
83
|
+
"cli": "nx",
|
|
84
|
+
"version": "14.0.0-beta.0",
|
|
85
|
+
"description": "Add a default development configuration for build and serve targets.",
|
|
86
|
+
"factory": "./src/migrations/update-14-0-0/add-default-development-configurations"
|
|
81
87
|
}
|
|
82
88
|
},
|
|
83
89
|
"packageJsonUpdates": {
|
|
@@ -237,6 +243,19 @@
|
|
|
237
243
|
"alwaysAddToPackageJson": false
|
|
238
244
|
}
|
|
239
245
|
}
|
|
246
|
+
},
|
|
247
|
+
"14.0.0": {
|
|
248
|
+
"version": "14.0.0-beta.1",
|
|
249
|
+
"packages": {
|
|
250
|
+
"next": {
|
|
251
|
+
"version": "12.1.5",
|
|
252
|
+
"alwaysAddToPackageJson": false
|
|
253
|
+
},
|
|
254
|
+
"eslint-config-next": {
|
|
255
|
+
"version": "12.1.5",
|
|
256
|
+
"alwaysAddToPackageJson": false
|
|
257
|
+
}
|
|
258
|
+
}
|
|
240
259
|
}
|
|
241
260
|
}
|
|
242
261
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/next",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0-beta.1",
|
|
4
4
|
"description": "When using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.\n\nThe Next.js plugin 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.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/plugin-proposal-decorators": "^7.14.5",
|
|
37
|
-
"@nrwl/react": "
|
|
38
|
-
"@nrwl/cypress": "
|
|
39
|
-
"@nrwl/devkit": "
|
|
40
|
-
"@nrwl/jest": "
|
|
41
|
-
"@nrwl/linter": "
|
|
42
|
-
"@nrwl/web": "
|
|
43
|
-
"@nrwl/workspace": "
|
|
37
|
+
"@nrwl/react": "14.0.0-beta.1",
|
|
38
|
+
"@nrwl/cypress": "14.0.0-beta.1",
|
|
39
|
+
"@nrwl/devkit": "14.0.0-beta.1",
|
|
40
|
+
"@nrwl/jest": "14.0.0-beta.1",
|
|
41
|
+
"@nrwl/linter": "14.0.0-beta.1",
|
|
42
|
+
"@nrwl/web": "14.0.0-beta.1",
|
|
43
|
+
"@nrwl/workspace": "14.0.0-beta.1",
|
|
44
44
|
"@svgr/webpack": "^6.1.2",
|
|
45
45
|
"chalk": "4.1.0",
|
|
46
46
|
"eslint-config-next": "^12.1.0",
|
|
@@ -16,7 +16,16 @@ function addJest(host, options) {
|
|
|
16
16
|
setupFile: 'none',
|
|
17
17
|
compiler: 'babel',
|
|
18
18
|
});
|
|
19
|
-
(0, devkit_1.
|
|
19
|
+
const tsConfigSpecJson = (0, devkit_1.readJson)(host, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.spec.json'));
|
|
20
|
+
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.json'), (json) => {
|
|
21
|
+
var _a, _b, _c, _d;
|
|
22
|
+
var _e;
|
|
23
|
+
(_a = json.compilerOptions) !== null && _a !== void 0 ? _a : (json.compilerOptions = {});
|
|
24
|
+
(_b = (_e = json.compilerOptions).types) !== null && _b !== void 0 ? _b : (_e.types = []);
|
|
25
|
+
json.compilerOptions.types.push(...((_d = (_c = tsConfigSpecJson === null || tsConfigSpecJson === void 0 ? void 0 : tsConfigSpecJson.compilerOptions) === null || _c === void 0 ? void 0 : _c.types) !== null && _d !== void 0 ? _d : []));
|
|
26
|
+
return json;
|
|
27
|
+
});
|
|
28
|
+
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.spec.json'), (json) => {
|
|
20
29
|
json.compilerOptions.jsx = 'react';
|
|
21
30
|
return json;
|
|
22
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-jest.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-jest.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"add-jest.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-jest.ts"],"names":[],"mappings":";;;;AAAA,yCAA6E;AAC7E,qCAAkD;AAGlD,SAAsB,OAAO,CAAC,IAAU,EAAE,OAAyB;;QACjE,IAAI,OAAO,CAAC,cAAc,KAAK,MAAM,EAAE;YACrC,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QAED,MAAM,QAAQ,GAAG,MAAM,IAAA,2BAAoB,EAAC,IAAI,EAAE;YAChD,OAAO,EAAE,OAAO,CAAC,WAAW;YAC5B,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;QAEH,MAAM,gBAAgB,GAAG,IAAA,iBAAQ,EAC/B,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAChE,CAAC;QAEF,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,eAAe,CAAC,EAC1D,CAAC,IAAI,EAAE,EAAE;;;YACP,MAAA,IAAI,CAAC,eAAe,oCAApB,IAAI,CAAC,eAAe,GAAK,EAAE,EAAC;YAC5B,YAAA,IAAI,CAAC,eAAe,EAAC,KAAK,uCAAL,KAAK,GAAK,EAAE,EAAC;YAClC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAC7B,GAAG,CAAC,MAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,eAAe,0CAAE,KAAK,mCAAI,EAAE,CAAC,CACpD,CAAC;YAEF,OAAO,IAAI,CAAC;QACd,CAAC,CACF,CAAC;QAEF,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,oBAAoB,CAAC,EAC/D,CAAC,IAAI,EAAE,EAAE;YACP,IAAI,CAAC,eAAe,CAAC,GAAG,GAAG,OAAO,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AA1CD,0BA0CC"}
|
|
@@ -12,19 +12,23 @@ function addProject(host, options) {
|
|
|
12
12
|
root: options.appProjectRoot,
|
|
13
13
|
outputPath: (0, devkit_1.joinPathFragments)('dist', options.appProjectRoot),
|
|
14
14
|
},
|
|
15
|
-
// This has to be here so `nx serve [app] --prod` will work. Otherwise
|
|
16
|
-
// a missing configuration error will be thrown.
|
|
17
15
|
configurations: {
|
|
16
|
+
development: {},
|
|
18
17
|
production: {},
|
|
19
18
|
},
|
|
20
19
|
};
|
|
21
20
|
targets.serve = {
|
|
22
21
|
builder: '@nrwl/next:server',
|
|
22
|
+
defaultConfiguration: 'development',
|
|
23
23
|
options: {
|
|
24
24
|
buildTarget: `${options.projectName}:build`,
|
|
25
25
|
dev: true,
|
|
26
26
|
},
|
|
27
27
|
configurations: {
|
|
28
|
+
development: {
|
|
29
|
+
buildTarget: `${options.projectName}:build:development`,
|
|
30
|
+
dev: true,
|
|
31
|
+
},
|
|
28
32
|
production: {
|
|
29
33
|
buildTarget: `${options.projectName}:build:production`,
|
|
30
34
|
dev: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-project.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-project.ts"],"names":[],"mappings":";;;AACA,yCAKsB;AAEtB,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAyB;IAC9D,MAAM,OAAO,GAAwB,EAAE,CAAC;IAExC,OAAO,CAAC,KAAK,GAAG;QACd,OAAO,EAAE,kBAAkB;QAC3B,OAAO,EAAE,CAAC,sBAAsB,CAAC;QACjC,oBAAoB,EAAE,YAAY;QAClC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO,CAAC,cAAc;YAC5B,UAAU,EAAE,IAAA,0BAAiB,EAAC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC;SAC9D;QACD,
|
|
1
|
+
{"version":3,"file":"add-project.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-project.ts"],"names":[],"mappings":";;;AACA,yCAKsB;AAEtB,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAyB;IAC9D,MAAM,OAAO,GAAwB,EAAE,CAAC;IAExC,OAAO,CAAC,KAAK,GAAG;QACd,OAAO,EAAE,kBAAkB;QAC3B,OAAO,EAAE,CAAC,sBAAsB,CAAC;QACjC,oBAAoB,EAAE,YAAY;QAClC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO,CAAC,cAAc;YAC5B,UAAU,EAAE,IAAA,0BAAiB,EAAC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC;SAC9D;QACD,cAAc,EAAE;YACd,WAAW,EAAE,EAAE;YACf,UAAU,EAAE,EAAE;SACf;KACF,CAAC;IAEF,OAAO,CAAC,KAAK,GAAG;QACd,OAAO,EAAE,mBAAmB;QAC5B,oBAAoB,EAAE,aAAa;QACnC,OAAO,EAAE;YACP,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,QAAQ;YAC3C,GAAG,EAAE,IAAI;SACV;QACD,cAAc,EAAE;YACd,WAAW,EAAE;gBACX,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,oBAAoB;gBACvD,GAAG,EAAE,IAAI;aACV;YACD,UAAU,EAAE;gBACV,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,mBAAmB;gBACtD,GAAG,EAAE,KAAK;aACX;SACF;KACF,CAAC;IAEF,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,OAAO,CAAC,KAAK,CAAC,OAAO,mCAChB,OAAO,CAAC,KAAK,CAAC,OAAO,KACxB,gBAAgB,EAAE,OAAO,CAAC,MAAM,GACjC,CAAC;KACH;IAED,OAAO,CAAC,MAAM,GAAG;QACf,OAAO,EAAE,mBAAmB;QAC5B,OAAO,EAAE;YACP,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,mBAAmB;SACvD;KACF,CAAC;IAEF,MAAM,OAAO,GAAyB;QACpC,IAAI,EAAE,OAAO,CAAC,cAAc;QAC5B,UAAU,EAAE,OAAO,CAAC,cAAc;QAClC,WAAW,EAAE,aAAa;QAC1B,OAAO;QACP,IAAI,EAAE,OAAO,CAAC,UAAU;KACzB,CAAC;IAEF,IAAA,gCAAuB,EACrB,IAAI,EACJ,OAAO,CAAC,WAAW,oBAEd,OAAO,GAEZ,OAAO,CAAC,gBAAgB,CACzB,CAAC;AACJ,CAAC;AAlED,gCAkEC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.update = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
+
function update(tree) {
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
9
|
+
projects.forEach((config, name) => {
|
|
10
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11
|
+
var _g, _h, _j, _k;
|
|
12
|
+
let shouldUpdate = false;
|
|
13
|
+
if (((_a = config.targets.build) === null || _a === void 0 ? void 0 : _a.executor) === '@nrwl/next:build') {
|
|
14
|
+
shouldUpdate = true;
|
|
15
|
+
(_b = (_g = config.targets.build).defaultConfiguration) !== null && _b !== void 0 ? _b : (_g.defaultConfiguration = 'production');
|
|
16
|
+
(_c = (_h = config.targets.build.configurations).development) !== null && _c !== void 0 ? _c : (_h.development = {});
|
|
17
|
+
}
|
|
18
|
+
if (((_d = config.targets.serve) === null || _d === void 0 ? void 0 : _d.executor) === '@nrwl/next:server') {
|
|
19
|
+
shouldUpdate = true;
|
|
20
|
+
(_e = (_j = config.targets.serve).defaultConfiguration) !== null && _e !== void 0 ? _e : (_j.defaultConfiguration = 'development');
|
|
21
|
+
(_f = (_k = config.targets.serve.configurations).development) !== null && _f !== void 0 ? _f : (_k.development = {
|
|
22
|
+
buildTarget: `${name}:build:development`,
|
|
23
|
+
dev: true,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (shouldUpdate)
|
|
27
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
28
|
+
});
|
|
29
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.update = update;
|
|
33
|
+
exports.default = update;
|
|
34
|
+
//# sourceMappingURL=add-default-development-configurations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-default-development-configurations.js","sourceRoot":"","sources":["../../../../../../packages/next/src/migrations/update-14-0-0/add-default-development-configurations.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AAEtB,SAAsB,MAAM,CAAC,IAAU;;QACrC,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;;;YAChC,IAAI,YAAY,GAAG,KAAK,CAAC;YACzB,IAAI,CAAA,MAAA,MAAM,CAAC,OAAO,CAAC,KAAK,0CAAE,QAAQ,MAAK,kBAAkB,EAAE;gBACzD,YAAY,GAAG,IAAI,CAAC;gBACpB,YAAA,MAAM,CAAC,OAAO,CAAC,KAAK,EAAC,oBAAoB,uCAApB,oBAAoB,GAAK,YAAY,EAAC;gBAC3D,YAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,EAAC,WAAW,uCAAX,WAAW,GAAK,EAAE,EAAC;aACxD;YAED,IAAI,CAAA,MAAA,MAAM,CAAC,OAAO,CAAC,KAAK,0CAAE,QAAQ,MAAK,mBAAmB,EAAE;gBAC1D,YAAY,GAAG,IAAI,CAAC;gBACpB,YAAA,MAAM,CAAC,OAAO,CAAC,KAAK,EAAC,oBAAoB,uCAApB,oBAAoB,GAAK,aAAa,EAAC;gBAC5D,YAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,EAAC,WAAW,uCAAX,WAAW,GAAK;oBAClD,WAAW,EAAE,GAAG,IAAI,oBAAoB;oBACxC,GAAG,EAAE,IAAI;iBACV,EAAC;aACH;YAED,IAAI,YAAY;gBAAE,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;QAEH,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAxBD,wBAwBC;AAED,kBAAe,MAAM,CAAC"}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const nxVersion = "*";
|
|
2
|
-
export declare const nextVersion = "12.1.
|
|
3
|
-
export declare const eslintConfigNextVersion = "12.1.
|
|
2
|
+
export declare const nextVersion = "12.1.5";
|
|
3
|
+
export declare const eslintConfigNextVersion = "12.1.5";
|
|
4
4
|
export declare const sassVersion = "1.43.2";
|
|
5
5
|
export declare const lessLoader = "10.2.0";
|
|
6
6
|
export declare const stylusLoader = "6.2.0";
|
package/src/utils/versions.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.babelPluginStyledComponentsVersion = exports.emotionServerVersion = exports.stylusLoader = exports.lessLoader = exports.sassVersion = exports.eslintConfigNextVersion = exports.nextVersion = exports.nxVersion = void 0;
|
|
4
|
-
exports.nxVersion = '
|
|
5
|
-
exports.nextVersion = '12.1.
|
|
6
|
-
exports.eslintConfigNextVersion = '12.1.
|
|
4
|
+
exports.nxVersion = '14.0.0-beta.1';
|
|
5
|
+
exports.nextVersion = '12.1.5';
|
|
6
|
+
exports.eslintConfigNextVersion = '12.1.5';
|
|
7
7
|
exports.sassVersion = '1.43.2';
|
|
8
8
|
exports.lessLoader = '10.2.0';
|
|
9
9
|
exports.stylusLoader = '6.2.0';
|