Skip to content

Commit

Permalink
feat(core): upgrade to Nx 14
Browse files Browse the repository at this point in the history
  • Loading branch information
rhutchison committed Jul 10, 2022
1 parent 00349d0 commit 425568b
Show file tree
Hide file tree
Showing 38 changed files with 15,097 additions and 13,391 deletions.
2 changes: 1 addition & 1 deletion apps/docs/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"root": "apps/docs",
"sourceRoot": "apps/docs/src",
"targets": {
"serve": {
Expand Down
2 changes: 1 addition & 1 deletion e2e/capacitor-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"root": "e2e/capacitor-e2e",
"sourceRoot": "e2e/capacitor-e2e/src",
"targets": {
"e2e": {
Expand Down
2 changes: 1 addition & 1 deletion e2e/firebase-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"root": "e2e/firebase-e2e",
"sourceRoot": "e2e/firebase-e2e/src",
"targets": {
"e2e": {
Expand Down
2 changes: 1 addition & 1 deletion e2e/ionic-angular-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"root": "e2e/ionic-angular-e2e",
"sourceRoot": "e2e/ionic-angular-e2e/src",
"targets": {
"e2e": {
Expand Down
2 changes: 1 addition & 1 deletion e2e/ionic-react-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"root": "e2e/ionic-react-e2e",
"sourceRoot": "e2e/ionic-react-e2e/src",
"targets": {
"e2e": {
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js → jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { getJestProjects } = require('@nrwl/jest');

module.exports = {
export default {
projects: [
...getJestProjects(),
'<rootDir>/packages/ionic-react-e2e',
Expand Down
3 changes: 2 additions & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const nxPreset = require('@nrwl/jest/preset');
const nxPreset = require('@nrwl/jest/preset').default;

module.exports = {
...nxPreset,
testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
Expand Down
26 changes: 14 additions & 12 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,18 @@
"runner": "@nrwl/nx-cloud",
"options": {
"accessToken": "",
"cacheableOperations": ["build", "test", "lint", "e2e"],
"cacheableOperations": [
"build",
"test",
"lint",
"e2e"
],
"canTrackAnalytics": false,
"showUsageWarnings": true,
"parallel": 1
}
}
},
"targetDependencies": {
"build": [
{
"target": "build",
"projects": "dependencies"
}
]
},
"cli": {
"defaultCollection": "@nrwl/nx-plugin"
},
"generators": {
"@nrwl/workspace": {
"library": {
Expand Down Expand Up @@ -93,5 +87,13 @@
"linter": "eslint"
}
}
},
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"dependsOn": [
"^build"
]
}
}
}
56 changes: 31 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,48 +37,54 @@
},
"private": true,
"dependencies": {
"@angular/core": "~14.0.0",
"@docusaurus/core": "2.0.0-beta.9",
"@docusaurus/preset-classic": "2.0.0-beta.9",
"@mdx-js/react": "^1.6.21",
"classnames": "^2.2.6",
"react": "17.0.2",
"react-dom": "17.0.2"
"react": "18.2.0",
"react-dom": "18.2.0",
"react-is": "18.0.0"
},
"devDependencies": {
"@nrwl/angular": "13.7.2",
"@nrwl/cli": "13.7.2",
"@nrwl/cypress": "13.7.2",
"@nrwl/devkit": "13.7.2",
"@nrwl/eslint-plugin-nx": "13.7.2",
"@nrwl/jest": "13.7.2",
"@nrwl/linter": "13.7.2",
"@nrwl/nx-cloud": "13.1.2",
"@nrwl/nx-plugin": "13.7.2",
"@nrwl/react": "13.7.2",
"@nrwl/tao": "13.7.2",
"@nrwl/web": "13.7.2",
"@nrwl/workspace": "13.7.2",
"@nrwl/angular": "14.4.2",
"@nrwl/cli": "14.4.2",
"@nrwl/cypress": "14.4.2",
"@nrwl/devkit": "14.4.2",
"@nrwl/eslint-plugin-nx": "14.4.2",
"@nrwl/jest": "14.4.2",
"@nrwl/linter": "14.4.2",
"@nrwl/node": "^14.4.2",
"@nrwl/nx-cloud": "14.2.0",
"@nrwl/nx-plugin": "14.4.2",
"@nrwl/react": "14.4.2",
"@nrwl/web": "14.4.2",
"@nrwl/workspace": "14.4.2",
"@nx-plus/docusaurus": "12.2.0",
"@types/jest": "27.0.2",
"@types/node": "14.14.33",
"@typescript-eslint/eslint-plugin": "5.10.2",
"@typescript-eslint/parser": "5.10.2",
"@swc-node/register": "^1.4.2",
"@swc/core": "^1.2.173",
"@types/jest": "27.4.1",
"@types/node": "18.0.0",
"@typescript-eslint/eslint-plugin": "5.29.0",
"@typescript-eslint/parser": "5.29.0",
"cross-env": "^7.0.3",
"cypress": "^8.3.0",
"dotenv": "10.0.0",
"eslint": "8.7.0",
"eslint": "8.15.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-cypress": "^2.10.3",
"husky": "^4.2.3",
"ignore": "^5.1.8",
"jest": "27.2.3",
"prettier": "2.5.1",
"jest": "27.5.1",
"nx": "14.4.2",
"prettier": "2.6.2",
"pretty-quick": "^2.0.1",
"ts-jest": "27.0.5",
"ts-node": "9.1.1",
"react-test-renderer": "18.0.0",
"ts-jest": "27.1.4",
"ts-node": "10.8.2",
"tslib": "^2.0.0",
"tslint": "6.1.3",
"typescript": "4.5.5"
"typescript": "4.7.4"
},
"resolutions": {
"terser": "^4.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
/* eslint-disable */
export default {
preset: '../../jest.preset.js',
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
Expand Down
6 changes: 3 additions & 3 deletions packages/capacitor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nxtend/capacitor",
"version": "13.0.0",
"version": "14.0.0",
"description": "An Nx plugin for developing cross-platform applications using Capacitor",
"author": {
"name": "Devin Shoemaker",
Expand All @@ -25,9 +25,9 @@
"migrations": "./migrations.json"
},
"dependencies": {
"@nrwl/devkit": "^13.0.0"
"@nrwl/devkit": "^14.0.0"
},
"peerDependencies": {
"@nrwl/workspace": "^13.0.0"
"@nrwl/workspace": "^14.0.0"
}
}
6 changes: 3 additions & 3 deletions packages/capacitor/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"root": "packages/capacitor",
"sourceRoot": "packages/capacitor/src",
"projectType": "library",
Expand All @@ -21,20 +22,19 @@
"test": {
"executor": "@nrwl/jest:jest",
"options": {
"jestConfig": "packages/capacitor/jest.config.js",
"jestConfig": "packages/capacitor/jest.config.ts",
"passWithNoTests": true
},
"outputs": ["coverage/packages/capacitor"]
},
"build": {
"executor": "@nrwl/node:package",
"executor": "@nrwl/js:tsc",
"options": {
"outputPath": "dist/packages/capacitor",
"tsConfig": "packages/capacitor/tsconfig.lib.json",
"packageJson": "packages/capacitor/package.json",
"main": "packages/capacitor/src/index.ts",
"assets": [
"packages/capacitor/*.md",
{
"input": "./packages/capacitor/src",
"glob": "**/*.!(ts)",
Expand Down
6 changes: 3 additions & 3 deletions packages/capacitor/src/executors/cap/executor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ExecutorContext, normalizePath } from '@nrwl/devkit';
import runCommands, {
RunCommandsBuilderOptions,
RunCommandsOptions,
} from '@nrwl/workspace/src/executors/run-commands/run-commands.impl';
import { CommandExecutorSchema } from './schema';

Expand All @@ -13,10 +13,10 @@ export default async function runExecutor(

const cmd = sanitizeCapacitorCommand(options.cmd);

const runCommandsOptions: RunCommandsBuilderOptions = {
const runCommandsOptions: RunCommandsOptions = {
cwd: projectRootPath,
command: `npx cap ${cmd}`,
};
} as any; // TODO: https://github.com/nrwl/nx/issues/10780

return await runCommands(runCommandsOptions, context);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/capacitor/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"declaration": true,
"types": ["node"]
},
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}
3 changes: 2 additions & 1 deletion packages/capacitor/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx",
"**/*.d.ts"
"**/*.d.ts",
"jest.config.ts"
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
/* eslint-disable */
export default {
displayName: 'firebase',
preset: '../../jest.preset.js',
globals: {
Expand Down
6 changes: 3 additions & 3 deletions packages/firebase/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nxtend/firebase",
"version": "12.1.0",
"version": "14.0.0",
"description": "An Nx plugin for developing cross-platform applications using Capacitor",
"author": {
"name": "Devin Shoemaker",
Expand All @@ -18,9 +18,9 @@
"schematics": "./generators.json",
"builders": "./executors.json",
"dependencies": {
"@nrwl/devkit": "^13.0.0"
"@nrwl/devkit": "^14.0.0"
},
"peerDependencies": {
"@nrwl/workspace": "^13.0.0"
"@nrwl/workspace": "^14.0.0"
}
}
12 changes: 8 additions & 4 deletions packages/firebase/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"root": "packages/firebase",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/firebase/src",
"projectType": "library",
"targets": {
Expand All @@ -14,20 +14,24 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/firebase"],
"options": {
"jestConfig": "packages/firebase/jest.config.js",
"jestConfig": "packages/firebase/jest.config.ts",
"passWithNoTests": true
}
},
"build": {
"executor": "@nrwl/node:package",
"executor": "@nrwl/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/firebase",
"tsConfig": "packages/firebase/tsconfig.lib.json",
"packageJson": "packages/firebase/package.json",
"main": "packages/firebase/src/index.ts",
"assets": [
"packages/firebase/*.md",
{
"input": "./packages/firebase",
"glob": "*.md",
"output": "."
},
{
"input": "./packages/firebase/src",
"glob": "**/*.!(ts)",
Expand Down
6 changes: 3 additions & 3 deletions packages/firebase/src/executors/firebase/executor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ExecutorContext, normalizePath } from '@nrwl/devkit';
import runCommands, {
RunCommandsBuilderOptions,
RunCommandsOptions,
} from '@nrwl/workspace/src/executors/run-commands/run-commands.impl';
import { CommandExecutorSchema } from './schema';

Expand All @@ -13,10 +13,10 @@ export default async function runExecutor(

const cmd = sanitizeCapacitorCommand(options.cmd);

const runCommandsOptions: RunCommandsBuilderOptions = {
const runCommandsOptions: RunCommandsOptions = {
cwd: projectRootPath,
command: `firebase ${cmd}`,
};
} as any; // TODO: https://github.com/nrwl/nx/issues/10780

return await runCommands(runCommandsOptions, context);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"declaration": true,
"types": ["node"]
},
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}
3 changes: 2 additions & 1 deletion packages/firebase/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx",
"**/*.d.ts"
"**/*.d.ts",
"jest.config.ts"
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
/* eslint-disable */
export default {
preset: '../../jest.preset.js',
globals: {
'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' },
Expand Down
Loading

0 comments on commit 425568b

Please sign in to comment.