@nx/next 18.3.0-beta.1 → 18.3.0-beta.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/next",
|
|
3
|
-
"version": "18.3.0-beta.
|
|
3
|
+
"version": "18.3.0-beta.2",
|
|
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, 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": "18.3.0-beta.
|
|
37
|
+
"@nx/devkit": "18.3.0-beta.2",
|
|
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": "18.3.0-beta.
|
|
49
|
-
"@nx/eslint": "18.3.0-beta.
|
|
50
|
-
"@nx/react": "18.3.0-beta.
|
|
51
|
-
"@nx/web": "18.3.0-beta.
|
|
52
|
-
"@nx/webpack": "18.3.0-beta.
|
|
53
|
-
"@nx/workspace": "18.3.0-beta.
|
|
54
|
-
"@nrwl/next": "18.3.0-beta.
|
|
48
|
+
"@nx/js": "18.3.0-beta.2",
|
|
49
|
+
"@nx/eslint": "18.3.0-beta.2",
|
|
50
|
+
"@nx/react": "18.3.0-beta.2",
|
|
51
|
+
"@nx/web": "18.3.0-beta.2",
|
|
52
|
+
"@nx/webpack": "18.3.0-beta.2",
|
|
53
|
+
"@nx/workspace": "18.3.0-beta.2",
|
|
54
|
+
"@nrwl/next": "18.3.0-beta.2"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
@@ -8,7 +8,7 @@ const react_1 = require("@nx/react");
|
|
|
8
8
|
const webpack_1 = require("@nx/webpack");
|
|
9
9
|
const path_1 = require("path");
|
|
10
10
|
function nxComponentTestingPreset(pathToConfig, options) {
|
|
11
|
-
if (global.NX_GRAPH_CREATION
|
|
11
|
+
if (global.NX_GRAPH_CREATION) {
|
|
12
12
|
// this is only used by plugins, so we don't need the component testing
|
|
13
13
|
// options, cast to any to avoid type errors
|
|
14
14
|
return (0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig);
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.nextInitGeneratorInternal = exports.nextInitGenerator = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
|
|
6
6
|
const versions_1 = require("@nx/react/src/utils/versions");
|
|
7
7
|
const add_gitignore_entry_1 = require("../../utils/add-gitignore-entry");
|
|
8
8
|
const versions_2 = require("../../utils/versions");
|
|
9
|
-
const add_plugin_1 = require("./lib/add-plugin");
|
|
10
9
|
function updateDependencies(host, schema) {
|
|
11
10
|
const tasks = [];
|
|
12
11
|
tasks.push((0, devkit_1.removeDependenciesFromPackageJson)(host, ['@nx/next'], []));
|
|
@@ -29,17 +28,23 @@ async function nextInitGeneratorInternal(host, schema) {
|
|
|
29
28
|
nxJson.useInferencePlugins !== false;
|
|
30
29
|
schema.addPlugin ??= addPluginDefault;
|
|
31
30
|
if (schema.addPlugin) {
|
|
32
|
-
|
|
31
|
+
const { createNodes } = await Promise.resolve().then(() => require('../../plugins/plugin'));
|
|
32
|
+
await (0, add_plugin_1.addPlugin)(host, await (0, devkit_1.createProjectGraphAsync)(), '@nx/next/plugin', createNodes, {
|
|
33
|
+
startTargetName: ['start', 'next:start', 'next-start'],
|
|
34
|
+
buildTargetName: ['build', 'next:build', 'next-build'],
|
|
35
|
+
devTargetName: ['dev', 'next:dev', 'next-dev'],
|
|
36
|
+
serveStaticTargetName: [
|
|
37
|
+
'serve-static',
|
|
38
|
+
'next:serve-static',
|
|
39
|
+
'next-serve-static',
|
|
40
|
+
],
|
|
41
|
+
}, schema.updatePackageScripts);
|
|
33
42
|
}
|
|
34
43
|
(0, add_gitignore_entry_1.addGitIgnoreEntry)(host);
|
|
35
44
|
let installTask = () => { };
|
|
36
45
|
if (!schema.skipPackageJson) {
|
|
37
46
|
installTask = updateDependencies(host, schema);
|
|
38
47
|
}
|
|
39
|
-
if (schema.updatePackageScripts) {
|
|
40
|
-
const { createNodes } = await Promise.resolve().then(() => require('../../plugins/plugin'));
|
|
41
|
-
await (0, update_package_scripts_1.updatePackageScripts)(host, createNodes);
|
|
42
|
-
}
|
|
43
48
|
return installTask;
|
|
44
49
|
}
|
|
45
50
|
exports.nextInitGeneratorInternal = nextInitGeneratorInternal;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addPlugin = void 0;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
function addPlugin(tree) {
|
|
6
|
-
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
7
|
-
nxJson.plugins ??= [];
|
|
8
|
-
for (const plugin of nxJson.plugins) {
|
|
9
|
-
if (typeof plugin === 'string'
|
|
10
|
-
? plugin === '@nx/next/plugin'
|
|
11
|
-
: plugin.plugin === '@nx/next/plugin') {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
nxJson.plugins.push({
|
|
16
|
-
plugin: '@nx/next/plugin',
|
|
17
|
-
options: {
|
|
18
|
-
buildTargetName: 'build',
|
|
19
|
-
devTargetName: 'dev',
|
|
20
|
-
startTargetName: 'start',
|
|
21
|
-
serveStaticTargetName: 'serve-static',
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
(0, devkit_1.updateNxJson)(tree, nxJson);
|
|
25
|
-
}
|
|
26
|
-
exports.addPlugin = addPlugin;
|