Skip to content

Commit

Permalink
chore(repo): fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Apr 4, 2023
1 parent 191adfa commit b54edbb
Show file tree
Hide file tree
Showing 25 changed files with 77 additions and 77 deletions.
3 changes: 1 addition & 2 deletions packages/cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"detect-port": "^1.5.1",
"@nx/devkit": "file:../devkit",
"@nx/js": "file:../js",
"@nx/linter": "file:../linter",
"@nx/workspace": "file:../workspace"
"@nx/linter": "file:../linter"
},
"peerDependencies": {
"cypress": ">= 3 < 13"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
assertMinimumCypressVersion,
installedCypressVersion,
} from '@nx/cypress/src/utils/cypress-version';
} from '../../utils/cypress-version';
import {
formatFiles,
installPackagesTask,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { formatFiles, readNxJson, Tree, updateNxJson } from '@nx/devkit';
import { forEachExecutorOptions } from '@nx/devkit/src/generators/executor-options-utils';
import { CypressExecutorOptions } from '@nx/cypress/src/executors/cypress/cypress.impl';
import { CypressExecutorOptions } from '../../executors/cypress/cypress.impl';

export default async function (tree: Tree) {
const nxJson = readNxJson(tree);
Expand Down
3 changes: 1 addition & 2 deletions packages/detox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"@nx/jest": "file:../jest",
"@nx/js": "file:../js",
"@nx/linter": "file:../linter",
"@nx/react": "file:../react",
"@nx/workspace": "file:../workspace"
"@nx/react": "file:../react"
},
"peerDependencies": {
"detox": "~20.5.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Tree, readJson } from '@nx/devkit';
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
import { Tree } from 'nx/src/generators/tree';
import { readJson } from 'nx/src/generators/utils/json';
import replacePackage from './update-16-0-0-add-nx-packages';

describe('update-16-0-0-add-nx-packages', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Tree, formatFiles } from '@nx/devkit';
import { replaceNrwlPackageWithNxPackage } from '@nx/devkit/src/utils/replace-package';
import { Tree } from 'nx/src/generators/tree';
import { formatFiles } from '../../generators/format-files';
import { replaceNrwlPackageWithNxPackage } from '../../utils/replace-package';

export default async function replacePackage(tree: Tree) {
await replaceNrwlPackageWithNxPackage(tree, '@nrwl/devkit', '@nx/devkit');
Expand Down
3 changes: 1 addition & 2 deletions packages/esbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"tslib": "^2.3.0",
"tsconfig-paths": "^4.1.2",
"@nx/devkit": "file:../devkit",
"@nx/js": "file:../js",
"@nx/workspace": "file:../workspace"
"@nx/js": "file:../js"
},
"peerDependencies": {
"esbuild": "~0.17.5"
Expand Down
3 changes: 1 addition & 2 deletions packages/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"@nx/js": "file:../js",
"@nx/linter": "file:../linter",
"@nx/react": "file:../react",
"@nx/webpack": "file:../webpack",
"@nx/workspace": "file:../workspace"
"@nx/webpack": "file:../webpack"
},
"peerDependencies": {
"expo": "^48.0.6"
Expand Down
2 changes: 1 addition & 1 deletion packages/expo/plugins/with-nx-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function withNxWebpack(config) {
test: /\.(mjs|[jt]sx?)$/,
exclude: /node_modules/,
use: {
loader: require.resolve('@nrwl/webpack/src/utils/web-babel-loader.js'),
loader: require.resolve('@nx/webpack/src/utils/web-babel-loader.js'),
options: {
presets: [
[
Expand Down
3 changes: 1 addition & 2 deletions packages/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
},
"dependencies": {
"@nx/devkit": "file:../devkit",
"@nx/node": "file:../node",
"@nx/workspace": "file:../workspace"
"@nx/node": "file:../node"
},
"peerDependencies": {
"express": "^4.18.1"
Expand Down
3 changes: 2 additions & 1 deletion packages/nest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"@nx/devkit": "file:../devkit",
"@nx/js": "file:../js",
"@nx/linter": "file:../linter",
"@nx/node": "file:../node"
"@nx/node": "file:../node",
"@nx/workspace": "file:../workspace"
},
"publishConfig": {
"access": "public"
Expand Down
9 changes: 7 additions & 2 deletions packages/nx/src/adapter/angular-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ export function shouldMergeAngularProjects(

function isNrwlAngularInstalled() {
try {
require.resolve('@nrwl/angular');
require.resolve('@nx/angular');
return true;
} catch {
return false;
try {
require.resolve('@nrwl/angular');
return true;
} catch {
return false;
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"minimatch": "3.0.5",
"@nx/devkit": "file:../devkit",
"@nx/js": "file:../js",
"@nx/linter": "file:../linter",
"@nx/workspace": "file:../workspace"
"@nx/linter": "file:../linter"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/react/plugins/storybook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ export const webpack = async (
// In case anyone is missing dep and did not run migrations.
// See: https://github.com/nrwl/nx/issues/14455
try {
require.resolve('@nrwl/webpack');
require.resolve('@nx/webpack');
} catch {
throw new Error(
`'@nrwl/webpack' package is not installed. Install it and try again.`
`'@nx/webpack' package is not installed. Install it and try again.`
);
}

Expand Down
3 changes: 1 addition & 2 deletions packages/rollup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
"rxjs": "^6.5.4",
"tslib": "^2.3.0",
"@nx/devkit": "file:../devkit",
"@nx/js": "file:../js",
"@nx/workspace": "file:../workspace"
"@nx/js": "file:../js"
},
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UiFramework, UiFramework7 } from '@nx/storybook/src/utils/models';
import { Constants } from '@nx/storybook/src/utils/utilities';
import { UiFramework, UiFramework7 } from '../../../utils/models';
import { Constants } from '../../../utils/utilities';
import { prompt } from 'enquirer';
import { StorybookConfigureSchema } from '../schema';

Expand Down
3 changes: 1 addition & 2 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"dotenv": "~10.0.0",
"enquirer": "~2.3.6",
"@nx/devkit": "file:../devkit",
"@nx/js": "file:../js",
"@nx/workspace": "file:../workspace"
"@nx/js": "file:../js"
},
"peerDependencies": {
"vite": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/web/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const nxJsBabelPreset = require('@nx/js/babel');
/** @deprecated Use `@nrwl/js/babel`. */
module.exports = function (api: any, options: any = {}) {
console.warn(
'`@nrwl/web/babel` has been deprecated. Use `@nrwl/js/babel` instead in your .babelrc files.'
'`@nx/web/babel` has been deprecated. Use `@nx/js/babel` instead in your .babelrc files.'
);
return nxJsBabelPreset(api, options);
};
3 changes: 1 addition & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"ignore": "^5.0.4",
"tslib": "^2.3.0",
"@nx/devkit": "file:../devkit",
"@nx/js": "file:../js",
"@nx/workspace": "file:../workspace"
"@nx/js": "file:../js"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/executors/dev-server/dev-server.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function* devServerExecutor(
) {
const { devServerExecutor: baseDevServerExecutor } = require('@nx/webpack');
logger.warn(
'"@nrwl/web:dev-server" executor is deprecated. Use "@nrwl/webpack:dev-server" instead in your project.json.'
'"@nx/web:dev-server" executor is deprecated. Use "@nx/webpack:dev-server" instead in your project.json.'
);
yield* baseDevServerExecutor(
{
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/executors/webpack/webpack.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ExecutorContext, logger } from '@nx/devkit';
export async function* webpackExecutor(options: any, context: ExecutorContext) {
const { webpackExecutor: baseWebpackExecutor } = require('@nx/webpack');
logger.warn(
'"@nrwl/web:webpack" executor is deprecated. Use "@nrwl/webpack:webpack" instead in your project.json.'
'"@nx/web:webpack" executor is deprecated. Use "@nx/webpack:webpack" instead in your project.json.'
);
yield* baseWebpackExecutor(
{
Expand Down
3 changes: 1 addition & 2 deletions packages/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
"webpack-node-externals": "^3.0.0",
"webpack-subresource-integrity": "^5.1.0",
"@nx/devkit": "file:../devkit",
"@nx/js": "file:../js",
"@nx/workspace": "file:../workspace"
"@nx/js": "file:../js"
},
"publishConfig": {
"access": "public"
Expand Down
9 changes: 4 additions & 5 deletions packages/webpack/src/utils/with-web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {
import { SubresourceIntegrityPlugin } from 'webpack-subresource-integrity';
import * as path from 'path';
import { basename, join } from 'path';
import { getOutputHashFormat } from '@nx/webpack/src/utils/hash-format';
import { PostcssCliResources } from '@nx/webpack/src/utils/webpack/plugins/postcss-cli-resources';
import { normalizeExtraEntryPoints } from '@nx/webpack/src/utils/webpack/normalize-entry';
import { getOutputHashFormat } from './hash-format';
import { PostcssCliResources } from './webpack/plugins/postcss-cli-resources';
import { normalizeExtraEntryPoints } from './webpack/normalize-entry';

import { NxWebpackPlugin } from './config';
import {
Expand All @@ -21,12 +21,11 @@ import { getClientEnvironment } from './get-client-environment';
import { ScriptsWebpackPlugin } from './webpack/plugins/scripts-webpack-plugin';
import { getCSSModuleLocalIdent } from './get-css-module-local-ident';
import { WriteIndexHtmlPlugin } from '../plugins/write-index-html-plugin';
import { ExecutorContext } from '@nx/devkit';
import CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
import MiniCssExtractPlugin = require('mini-css-extract-plugin');
import autoprefixer = require('autoprefixer');
import postcssImports = require('postcss-import');
import { NxWebpackExecutionContext } from '@nx/webpack/src/utils/config';
import { NxWebpackExecutionContext } from './config';

interface PostcssOptions {
(loader: any): any;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { formatFiles, Tree } from '@nx/devkit';
import convertToNxProject from '@nx/workspace/src/generators/convert-to-nx-project/convert-to-nx-project';
import convertToNxProject from '../../generators/convert-to-nx-project/convert-to-nx-project';

export async function splitConfigurationIntoProjectJsonFiles(tree: Tree) {
await convertToNxProject(tree, { all: true });
Expand Down
73 changes: 38 additions & 35 deletions scripts/depcheck/missing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ const IGNORE_MATCHES_IN_PACKAGE = {
'nx',
'prettier',
'typescript',
'rxjs',
'@nrwl/cli',
'@nrwl/workspace',
// These are installed as needed and should not be added to package.json
'@nrwl/cypress',
'@nrwl/jest',
'@nrwl/rollup',
'@nrwl/storybook',
'@nrwl/vite',
'@nrwl/webpack',
'@nx/cypress',
'@nx/jest',
'@nx/rollup',
'@nx/storybook',
'@nx/vite',
'@nx/webpack',
],
angular: [
'@angular-devkit/architect',
Expand Down Expand Up @@ -54,7 +51,7 @@ const IGNORE_MATCHES_IN_PACKAGE = {
'tailwindcss',
],
cli: ['nx'],
cypress: ['cypress', '@angular-devkit/schematics', '@nrwl/cypress', 'vite'],
cypress: ['cypress', '@angular-devkit/schematics', 'vite'],
devkit: [
'@angular-devkit/architect',
'@angular-devkit/schematics',
Expand All @@ -68,7 +65,7 @@ const IGNORE_MATCHES_IN_PACKAGE = {
'identity-obj-proxy',
'@angular-devkit/schematics',
],
js: ['@nrwl/linter'],
js: [],
linter: [
'eslint',
'@angular-devkit/schematics',
Expand All @@ -80,7 +77,6 @@ const IGNORE_MATCHES_IN_PACKAGE = {
],
next: [
'@angular-devkit/architect',
'@nrwl/devkit',
'express',
'http-proxy-middleware',
'next',
Expand Down Expand Up @@ -117,6 +113,7 @@ const IGNORE_MATCHES_IN_PACKAGE = {
'webpack',
'webpack-merge',
],
'react-native': ['@nx/storybook'],
rollup: ['@swc/core'],
storybook: [
'@angular-devkit/architect',
Expand All @@ -128,7 +125,11 @@ const IGNORE_MATCHES_IN_PACKAGE = {
'@storybook/core-server',
'@storybook/types',
// lazy installed with ensurePackage
'@nrwl/web',
'@nx/web',
'@nx/jest',
'@nx/rollup',
'@nx/vite',
'@nx/webpack',
'rxjs',
],
nx: [
Expand All @@ -137,47 +138,49 @@ const IGNORE_MATCHES_IN_PACKAGE = {
'@angular-devkit/core',
'@angular-devkit/architect',
'@angular/cli',
'@nx/angular',
'@nrwl/angular',
'@nrwl/cli',
'rxjs',
'@nestjs/cli', // nx init nest makes use of nestjs cli (which should be available in NestJS CLI app) to parse the nest-cli.json file
'ts-node', // We *may* fall back on ts-node, but we want to encourage the use of @swc-node instead so we don't explicitly list ts-node as an optional dep
'@nrwl/nx-android-arm-eabi', // native optional deps
'@nrwl/nx-android-arm64', // native optional deps
'@nrwl/nx-darwin-arm64', // native optional deps
'@nrwl/nx-darwin-universal', // native optional deps
'@nrwl/nx-darwin-x64', // native optional deps
'@nrwl/nx-freebsd-x64', // native optional deps
'@nrwl/nx-linux-arm-gnueabihf', // native optional deps
'@nrwl/nx-linux-arm64-gnu', // native optional deps
'@nrwl/nx-linux-arm64-musl', // native optional deps
'@nrwl/nx-linux-x64-gnu', // native optional deps
'@nrwl/nx-linux-x64-musl', // native optional deps
'@nrwl/nx-win32-arm64-msvc', // native optional deps
'@nrwl/nx-win32-ia32-msvc', // native optional deps
'@nrwl/nx-win32-x64-msvc', // native optional deps
'@nx/nx-android-arm-eabi', // native optional deps
'@nx/nx-android-arm64', // native optional deps
'@nx/nx-darwin-arm64', // native optional deps
'@nx/nx-darwin-universal', // native optional deps
'@nx/nx-darwin-x64', // native optional deps
'@nx/nx-freebsd-x64', // native optional deps
'@nx/nx-linux-arm-gnueabihf', // native optional deps
'@nx/nx-linux-arm64-gnu', // native optional deps
'@nx/nx-linux-arm64-musl', // native optional deps
'@nx/nx-linux-x64-gnu', // native optional deps
'@nx/nx-linux-x64-musl', // native optional deps
'@nx/nx-win32-arm64-msvc', // native optional deps
'@nx/nx-win32-ia32-msvc', // native optional deps
'@nx/nx-win32-x64-msvc', // native optional deps
'memfs', // used in mock for handling .node files in tests
],
web: [
// we don't want to bloat the install of @nrwl/web by including @swc/core and swc-loader as a dependency.
'@swc/core',
'swc-loader',

'@nx/cypress',
'@nx/jest',
'@nx/rollup',
'@nx/vite',
'@nx/webpack',
'fibers',
'node-sass',
],
webpack: ['@swc/core', 'style-loader', 'swc-loader'],
workspace: [
'tslint',
'@angular-devkit/architect',
'@angular-devkit/core',
'@angular-devkit/schematics',
'webpack',
'webpack-dev-server',
'@nrwl/cli',
'@nrwl/jest',
'@nrwl/linter',
'tsconfig-paths',
'@phenomnomnominal/tsquery',
],
nest: ['semver'],
nest: ['@nx/workspace', 'semver'],
'make-angular-cli-faster': ['@angular/core'],
};

Expand Down

0 comments on commit b54edbb

Please sign in to comment.