Skip to content

Commit

Permalink
add Nx v12 support
Browse files Browse the repository at this point in the history
- run migrations
- fix default schema values
- update deprecated schema id properties
  • Loading branch information
BuckyMaler authored and ZachJW34 committed May 31, 2021
1 parent 0decfba commit 05f98b7
Show file tree
Hide file tree
Showing 21 changed files with 492 additions and 366 deletions.
2 changes: 1 addition & 1 deletion libs/docusaurus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
If you have not already, [create an Nx workspace](https://github.com/nrwl/nx#creating-an-nx-workspace) with the following:

```
npx create-nx-workspace@^11.0.0
npx create-nx-workspace@^12.0.0
```

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion libs/docusaurus/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
coverageDirectory: '../../coverage/libs/docusaurus',
globals: { 'ts-jest': { tsConfig: '<rootDir>/tsconfig.spec.json' } },
globals: { 'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' } },
displayName: 'docusaurus',
};
12 changes: 6 additions & 6 deletions libs/docusaurus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nx-plus/docusaurus",
"version": "11.0.1",
"version": "12.0.0",
"main": "src/index.js",
"schematics": "./collection.json",
"builders": "./builders.json",
Expand All @@ -25,14 +25,14 @@
},
"homepage": "https://github.com/ZachJW34/nx-plus/tree/master/libs/docusaurus#readme",
"peerDependencies": {
"@nrwl/workspace": "^11.0.0"
"@nrwl/workspace": "^12.0.0"
},
"dependencies": {
"@angular-devkit/architect": "0.1102.1",
"@angular-devkit/core": "11.2.1",
"@angular-devkit/schematics": "11.2.1",
"@angular-devkit/architect": "0.1200.0",
"@angular-devkit/core": "12.0.0",
"@angular-devkit/schematics": "12.0.0",
"rxjs": "6.5.5",
"typescript": "4.0.3"
"typescript": "4.1.4"
},
"ng-update": {
"migrations": "./migrations.json"
Expand Down
2 changes: 1 addition & 1 deletion libs/docusaurus/src/schematics/app/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/schema",
"id": "App",
"$id": "App",
"title": "",
"type": "object",
"properties": {
Expand Down
6 changes: 3 additions & 3 deletions libs/nuxt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If you have not already, [create an Nx workspace](https://github.com/nrwl/nx#creating-an-nx-workspace) with the following:

```
npx create-nx-workspace@^11.0.0
npx create-nx-workspace@^12.0.0
```

### Peer Dependencies
Expand All @@ -31,10 +31,10 @@ If you have not already, install peer dependencies with the following:

```
# npm
npm install @nrwl/cypress@^11.0.0 @nrwl/jest@^11.0.0 @nrwl/linter@^11.0.0 --save-dev
npm install @nrwl/cypress@^12.0.0 @nrwl/jest@^12.0.0 @nrwl/linter@^12.0.0 --save-dev
# yarn
yarn add @nrwl/cypress@^11.0.0 @nrwl/jest@^11.0.0 @nrwl/linter@^11.0.0 --dev
yarn add @nrwl/cypress@^12.0.0 @nrwl/jest@^12.0.0 @nrwl/linter@^12.0.0 --dev
```

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion libs/nuxt/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
coverageDirectory: '../../coverage/libs/nuxt',
globals: { 'ts-jest': { tsConfig: '<rootDir>/tsconfig.spec.json' } },
globals: { 'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' } },
displayName: 'nuxt',
};
16 changes: 8 additions & 8 deletions libs/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nx-plus/nuxt",
"version": "11.0.1",
"version": "12.0.0",
"main": "src/index.js",
"schematics": "./collection.json",
"builders": "./builders.json",
Expand All @@ -27,15 +27,15 @@
},
"homepage": "https://github.com/ZachJW34/nx-plus/tree/master/libs/nuxt#readme",
"peerDependencies": {
"@nrwl/cypress": "^11.0.0",
"@nrwl/jest": "^11.0.0",
"@nrwl/linter": "^11.0.0",
"@nrwl/workspace": "^11.0.0"
"@nrwl/cypress": "^12.0.0",
"@nrwl/jest": "^12.0.0",
"@nrwl/linter": "^12.0.0",
"@nrwl/workspace": "^12.0.0"
},
"dependencies": {
"@angular-devkit/architect": "0.1102.1",
"@angular-devkit/core": "11.2.1",
"@angular-devkit/schematics": "11.2.1",
"@angular-devkit/architect": "0.1200.0",
"@angular-devkit/core": "12.0.0",
"@angular-devkit/schematics": "12.0.0",
"fs-extra": "^9.0.1",
"rxjs": "6.5.5",
"semver": "^7.3.2",
Expand Down
2 changes: 1 addition & 1 deletion libs/nuxt/src/schematics/application/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/schema",
"id": "Application",
"$id": "Application",
"title": "",
"type": "object",
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions libs/nuxt/src/schematics/application/schematic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function checkPeerDeps(
context: SchematicContext,
options: ApplicationSchematicSchema
): void {
const expectedVersion = '^11.0.0';
const expectedVersion = '^12.0.0';
const unmetPeerDeps = [
...(options.e2eTestRunner === 'cypress' ? ['@nrwl/cypress'] : []),
...(options.unitTestRunner === 'jest' ? ['@nrwl/jest'] : []),
Expand Down Expand Up @@ -211,7 +211,7 @@ function addJest(options: NormalizedSchema): Rule {
'^vue$': 'vue/dist/vue.common.js',
},
globals: {
'ts-jest': { tsConfig: '<rootDir>/tsconfig.spec.json' },
'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' },
'vue-jest': { tsConfig: '${
options.projectRoot
}/tsconfig.spec.json' },
Expand Down
6 changes: 3 additions & 3 deletions libs/vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
If you have not already, [create an Nx workspace](https://github.com/nrwl/nx#creating-an-nx-workspace) with the following:

```
npx create-nx-workspace@^11.0.0
npx create-nx-workspace@^12.0.0
```

### Peer Dependencies
Expand All @@ -32,10 +32,10 @@ If you have not already, install peer dependencies with the following:

```
# npm
npm install @nrwl/cypress@^11.0.0 @nrwl/jest@^11.0.0 @nrwl/linter@^11.0.0 --save-dev
npm install @nrwl/cypress@^12.0.0 @nrwl/jest@^12.0.0 @nrwl/linter@^12.0.0 --save-dev
# yarn
yarn add @nrwl/cypress@^11.0.0 @nrwl/jest@^11.0.0 @nrwl/linter@^11.0.0 --dev
yarn add @nrwl/cypress@^12.0.0 @nrwl/jest@^12.0.0 @nrwl/linter@^12.0.0 --dev
```

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion libs/vue/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
coverageDirectory: '../../coverage/libs/vue',
globals: { 'ts-jest': { tsConfig: '<rootDir>/tsconfig.spec.json' } },
globals: { 'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' } },
displayName: 'vue',
testTimeout: 10000,
};
18 changes: 9 additions & 9 deletions libs/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nx-plus/vue",
"version": "11.0.1",
"version": "12.0.0",
"main": "src/index.js",
"schematics": "./collection.json",
"builders": "./builders.json",
Expand All @@ -27,15 +27,15 @@
},
"homepage": "https://github.com/ZachJW34/nx-plus/tree/master/libs/vue#readme",
"peerDependencies": {
"@nrwl/cypress": "^11.0.0",
"@nrwl/jest": "^11.0.0",
"@nrwl/linter": "^11.0.0",
"@nrwl/workspace": "^11.0.0"
"@nrwl/cypress": "^12.0.0",
"@nrwl/jest": "^12.0.0",
"@nrwl/linter": "^12.0.0",
"@nrwl/workspace": "^12.0.0"
},
"dependencies": {
"@angular-devkit/architect": "0.1102.1",
"@angular-devkit/core": "11.2.1",
"@angular-devkit/schematics": "11.2.1",
"@angular-devkit/architect": "0.1200.0",
"@angular-devkit/core": "12.0.0",
"@angular-devkit/schematics": "12.0.0",
"@vue/cli-shared-utils": "~4.5.0",
"copy-webpack-plugin": "^5.1.1",
"fs-extra": "^9.0.1",
Expand All @@ -48,7 +48,7 @@
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"tsconfig-paths-webpack-plugin": "3.3.0",
"typescript": "4.0.3"
"typescript": "4.1.4"
},
"ng-update": {
"migrations": "./migrations.json"
Expand Down
4 changes: 2 additions & 2 deletions libs/vue/src/schematics/application/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/schema",
"id": "Application",
"$id": "Application",
"title": "Vue Application Options Schema",
"type": "object",
"properties": {
Expand Down Expand Up @@ -71,7 +71,7 @@
"vueVersion": {
"description": "The version of Vue.js that you want to start the project with.",
"type": "number",
"default": 2,
"default": 0,
"x-prompt": {
"message": "Which version of Vue.js would you like to use?",
"type": "list",
Expand Down
4 changes: 2 additions & 2 deletions libs/vue/src/schematics/application/schematic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ function addJest(options: NormalizedSchema): Rule {
}',
snapshotSerializers: ['jest-serializer-vue'],
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
${
options.babel ? `babelConfig: '<rootDir>/babel.config.js',` : ''
}
Expand Down
2 changes: 1 addition & 1 deletion libs/vue/src/schematics/component/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/schema",
"id": "Component",
"$id": "Component",
"title": "Create a Vue Component",
"type": "object",
"examples": [
Expand Down
4 changes: 2 additions & 2 deletions libs/vue/src/schematics/library/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/schema",
"id": "Vue library",
"$id": "Vue library",
"title": "Create a Vue Library",
"type": "object",
"properties": {
Expand Down Expand Up @@ -45,7 +45,7 @@
"vueVersion": {
"description": "The version of Vue.js that you want to start the project with.",
"type": "number",
"default": 2,
"default": 0,
"x-prompt": {
"message": "Which version of Vue.js would you like to use?",
"type": "list",
Expand Down
2 changes: 1 addition & 1 deletion libs/vue/src/schematics/library/schematic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function addJest(options: NormalizedSchema): Rule {
snapshotSerializers: ['jest-serializer-vue'],
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
tsconfig: '<rootDir>/tsconfig.spec.json',
${
options.babel ? `babelConfig: '<rootDir>/babel.config.js',` : ''
}
Expand Down
2 changes: 1 addition & 1 deletion libs/vue/src/schematics/vuex/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/schema",
"id": "Vuex",
"$id": "Vuex",
"title": "Vuex Options Schema",
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion libs/vue/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function clearRequireCache(id, map = new Map()) {
}

export function checkPeerDeps(context: SchematicContext, options): void {
const expectedVersion = '^11.0.0';
const expectedVersion = '^12.0.0';
const unmetPeerDeps = [
...(options.e2eTestRunner === 'cypress' ? ['@nrwl/cypress'] : []),
...(options.unitTestRunner === 'jest' ? ['@nrwl/jest'] : []),
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@
"private": true,
"dependencies": {},
"devDependencies": {
"@angular-devkit/architect": "0.1102.1",
"@angular-devkit/core": "11.2.1",
"@angular-devkit/schematics": "11.2.1",
"@angular-devkit/architect": "0.1200.0",
"@angular-devkit/core": "12.0.0",
"@angular-devkit/schematics": "12.0.0",
"@docusaurus/core": "^2.0.0-alpha.61",
"@nrwl/cli": "11.5.1",
"@nrwl/cypress": "11.5.1",
"@nrwl/eslint-plugin-nx": "11.5.1",
"@nrwl/jest": "11.5.1",
"@nrwl/nx-plugin": "11.5.1",
"@nrwl/tao": "11.5.1",
"@nrwl/workspace": "11.5.1",
"@nrwl/cli": "12.3.3",
"@nrwl/cypress": "12.3.3",
"@nrwl/eslint-plugin-nx": "12.3.3",
"@nrwl/jest": "12.3.3",
"@nrwl/nx-plugin": "12.3.3",
"@nrwl/tao": "12.3.3",
"@nrwl/workspace": "12.3.3",
"@types/fs-extra": "^9.0.1",
"@types/jest": "26.0.8",
"@types/node": "12.12.38",
"@types/node": "14.14.33",
"@types/semver": "^7.3.4",
"@typescript-eslint/eslint-plugin": "4.3.0",
"@typescript-eslint/parser": "4.3.0",
"@typescript-eslint/eslint-plugin": "4.19.0",
"@typescript-eslint/parser": "4.19.0",
"@vue/cli-service": "~4.5.0",
"@vue/cli-shared-utils": "~4.5.0",
"dotenv": "6.2.0",
"eslint": "7.10.0",
"dotenv": "8.2.0",
"eslint": "7.22.0",
"eslint-config-prettier": "8.1.0",
"fs-extra": "^9.0.1",
"husky": "^4.2.5",
Expand All @@ -68,9 +68,9 @@
"prettier": "2.2.1",
"rxjs": "6.5.5",
"semver": "^7.3.2",
"ts-jest": "26.4.0",
"ts-jest": "26.5.5",
"ts-node": "9.1.1",
"tslint": "6.1.3",
"typescript": "4.0.3"
"typescript": "4.1.4"
}
}
Loading

0 comments on commit 05f98b7

Please sign in to comment.