Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgraded nx to 14 #354

Merged
merged 8 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const nxPreset = require("@nrwl/jest/preset");
const nxPreset = require('@nrwl/jest/preset').default;

module.exports = { ...nxPreset };
42 changes: 29 additions & 13 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@nrwl/workspace/presets/core.json",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"npmScope": "near-wallet-selector",
"workspaceLayout": {
"appsDir": "examples",
Expand All @@ -8,18 +8,34 @@
"affected": {
"defaultBase": "main"
},
"cli": {
"defaultCollection": "@nrwl/react"
"implicitDependencies": {
"package.json": {
"dependencies": "*",
"devDependencies": "*"
},
".eslintrc.json": "*"
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
"cacheableOperations": [
"build",
"lint",
"test",
"e2e"
],
"accessToken": "NzY1ODVkMGItMTVlNC00MzQxLWJkYmQtZGFkNzY0YmFmODA3fHJlYWQtd3JpdGU="
}
}
},
"targetDefaults": {
"build": {
"dependsOn": [
"^build"
]
}
},
"generators": {
"@nrwl/react": {
"application": {
Expand All @@ -35,24 +51,24 @@
"linter": "eslint"
}
},
"@nrwl/next": {
"application": {
"style": "scss",
"linter": "eslint"
}
},
"@nrwl/angular:application": {
"style": "scss",
"linter": "eslint",
"unitTestRunner": "jest",
"e2eTestRunner": "cypress"
"unitTestRunner": "none",
"e2eTestRunner": "none"
},
"@nrwl/angular:library": {
"linter": "eslint",
"unitTestRunner": "jest"
"unitTestRunner": "none"
},
"@nrwl/angular:component": {
"style": "scss"
},
"@nrwl/next": {
"application": {
"style": "css",
"linter": "eslint"
}
}
},
"defaultProject": "react"
Expand Down
130 changes: 65 additions & 65 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,76 +53,75 @@
"serve:angular": "nx serve angular",
"prepack": "yarn build:core && yarn build:all",
"test": "nx run-many --target=test --all",
"postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2015 browser module main && yarn build:core",
"ng": "nx"
"postinstall": "ngcc --properties es2020 browser module main"
amirsaran3 marked this conversation as resolved.
Show resolved Hide resolved
amirsaran3 marked this conversation as resolved.
Show resolved Hide resolved
},
"dependencies": {
"@angular/animations": "~13.2.0",
"@angular/common": "~13.2.0",
"@angular/compiler": "~13.2.0",
"@angular/core": "~13.2.0",
"@angular/forms": "~13.2.0",
"@angular/platform-browser": "~13.2.0",
"@angular/platform-browser-dynamic": "~13.2.0",
"@angular/router": "~13.2.0",
"@jscutlery/semver": "2.21.6",
"@ledgerhq/hw-transport": "^6.20.0",
"@ledgerhq/hw-transport-webhid": "^6.20.0",
"@ledgerhq/logs": "^6.10.0",
"@angular/animations": "~14.0.0",
"@angular/common": "~14.0.0",
"@angular/compiler": "~14.0.0",
"@angular/core": "~14.0.0",
"@angular/forms": "~14.0.0",
"@angular/platform-browser": "~14.0.0",
"@angular/platform-browser-dynamic": "~14.0.0",
"@angular/router": "~14.0.0",
"@jscutlery/semver": "^2.25.2",
"@ledgerhq/hw-transport": "^6.27.1",
lewis-sqa marked this conversation as resolved.
Show resolved Hide resolved
"@ledgerhq/hw-transport-webhid": "^6.27.1",
"@meteorwallet/sdk": "^0.0.9",
"@nightlylabs/connect": "0.0.23",
"@nrwl/next": "13.8.5",
"@walletconnect/qrcode-modal": "2.0.0-alpha.20",
"@walletconnect/sign-client": "^2.0.0-beta.102",
"big.js": "^6.1.1",
"better-sqlite3": "^7.6.2",
"bn.js": "^5.2.0",
"buffer": "^6.0.3",
"core-js": "^3.6.5",
"is-mobile": "^3.0.0",
"near-api-js": "0.44.2",
"next": "12.1.0",
"ngx-deploy-npm": "^3.1.7",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"regenerator-runtime": "^0.13.9",
"rxjs": "~7.4.0",
"tslib": "^2.0.0",
"is-mobile": "^3.1.1",
"near-api-js": "^0.44.2",
"next": "12.1.6",
"ngx-deploy-npm": "^4.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"regenerator-runtime": "0.13.7",
"rxjs": "^7.5.5",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.2.0",
"@angular-eslint/eslint-plugin": "~13.0.1",
"@angular-eslint/eslint-plugin-template": "~13.0.1",
"@angular-eslint/template-parser": "~13.0.1",
"@angular/cli": "~13.2.0",
"@angular/compiler-cli": "~13.2.0",
"@angular/language-service": "~13.2.0",
"@angular-devkit/build-angular": "~14.0.0",
amirsaran3 marked this conversation as resolved.
Show resolved Hide resolved
"@angular-eslint/eslint-plugin": "~14.0.0",
"@angular-eslint/eslint-plugin-template": "~14.0.0",
"@angular-eslint/template-parser": "~14.0.0",
"@angular/cli": "~14.0.0",
"@angular/compiler-cli": "~14.0.0",
"@angular/language-service": "~14.0.0",
"@babel/preset-react": "^7.16.7",
"@nrwl/angular": "^13.8.5",
"@nrwl/cli": "13.8.5",
"@nrwl/cypress": "13.8.5",
"@nrwl/eslint-plugin-nx": "13.8.5",
"@nrwl/jest": "13.8.5",
"@nrwl/js": "13.8.5",
"@nrwl/linter": "13.8.5",
"@nrwl/next": "13.8.5",
"@nrwl/angular": "14.4.2",
"@nrwl/cli": "14.4.2",
"@nrwl/cypress": "14.4.2",
"@nrwl/eslint-plugin-nx": "14.4.2",
"@nrwl/jest": "14.4.2",
"@nrwl/js": "14.4.2",
"@nrwl/linter": "14.4.2",
"@nrwl/next": "^14.4.2",
"@nrwl/nx-cloud": "latest",
"@nrwl/react": "^13.8.5",
"@nrwl/react": "14.4.2",
"@nrwl/tao": "13.8.5",
"@nrwl/web": "13.8.5",
"@nrwl/workspace": "13.8.5",
"@nrwl/web": "^14.4.2",
"@nrwl/workspace": "14.4.2",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^9.0.0",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/react-hooks": "7.0.2",
"@types/big.js": "^6.1.3",
"@testing-library/react": "13.3.0",
"@testing-library/react-hooks": "^7.0.2",
"@types/big.js": "^6.1.5",
"@types/bn.js": "^5.1.0",
"@types/jest": "^27.4.0",
"@types/gh-pages": "^3.2.1",
"@types/jest": "27.4.1",
"@types/node": "16.11.7",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"@types/react": "18.0.14",
"@types/react-dom": "18.0.5",
"@types/regenerator-runtime": "^0.13.1",
"@types/w3c-web-hid": "^1.0.2",
"@types/w3c-web-usb": "^1.0.5",
Expand All @@ -131,24 +130,25 @@
"@walletconnect/types": "^2.0.0-beta.102",
"babel-jest": "27.2.3",
"cypress": "^9.1.0",
"eslint": "8.10.0",
"eslint-config-next": "12.1.1-canary.3",
"eslint-config-prettier": "8.4.0",
"eslint": "~8.15.0",
"eslint-config-next": "12.1.6",
"eslint-config-prettier": "8.1.0",
lewis-sqa marked this conversation as resolved.
Show resolved Hide resolved
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-import": "2.25.2",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.29.2",
"eslint-plugin-react-hooks": "4.3.0",
"gh-pages": "^3.2.3",
"jest": "^27.4.7",
"jest-mock-extended": "^2.0.4",
"jest-preset-angular": "11.1.1",
"prettier": "^2.5.1",
"react-test-renderer": "17.0.2",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "7.30.1",
"eslint-plugin-react-hooks": "4.6.0",
"jest": "27.5.1",
"jest-mock-extended": "^2.0.6",
"jest-preset-angular": "^12.2.0",
"nx": "14.4.2",
"prettier": "^2.7.1",
"react-test-renderer": "18.2.0",
"sass": "1.52.3",
"semantic-release": "^19.0.2",
"ts-jest": "^27.1.3",
"ts-node": "^10.4.0",
"typescript": "~4.5.2"
"ts-jest": "27.1.4",
"ts-node": "~10.8.0",
"typescript": "~4.7.2"
}
}
2 changes: 1 addition & 1 deletion packages/core/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
16 changes: 16 additions & 0 deletions packages/core/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* eslint-disable */
export default {
displayName: 'core',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/packages/core',
};
14 changes: 6 additions & 8 deletions packages/core/project.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"root": "packages/core",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/core/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "@nrwl/web:rollup",
Expand All @@ -16,7 +15,7 @@
"rollupConfig": "@nrwl/react/plugins/bundle-rollup",
"buildableProjectDepsInPackageJsonType": "dependencies",
"compiler": "babel",
"format": ["esm", "umd", "cjs"],
"format": ["esm", "cjs"],
"assets": [
{
"glob": "packages/core/README.md",
Expand All @@ -30,16 +29,14 @@
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"packages/core/**/*.{ts,tsx,js,jsx}"
]
"lintFilePatterns": ["packages/core/**/*.{ts,tsx,js,jsx}"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/core"],
"options": {
"jestConfig": "packages/core/jest.config.js",
"jestConfig": "packages/core/jest.config.ts",
"passWithNoTests": true
}
},
Expand Down Expand Up @@ -67,5 +64,6 @@
"access": "public"
}
}
}
},
"tags": []
}
33 changes: 21 additions & 12 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"jsx": "react-jsx",
"allowJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
Expand All @@ -20,5 +9,25 @@
{
"path": "./tsconfig.spec.json"
}
]
],
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"jsx": "preserve",
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"types": [
"node",
"jest"
],
"noEmit": true,
"resolveJsonModule": true,
"isolatedModules": true,
"incremental": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
}
lewis-sqa marked this conversation as resolved.
Show resolved Hide resolved
}
20 changes: 4 additions & 16 deletions packages/core/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node"]
"declaration": true,
"types": []
},
"files": [
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../node_modules/@nrwl/react/typings/image.d.ts"
],
"exclude": [
"**/*.spec.ts",
"**/*.test.ts",
"**/*.spec.tsx",
"**/*.test.tsx",
"**/*.spec.js",
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx"
],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
"include": ["**/*.ts"],
"exclude": ["jest.config.ts", "**/*.spec.ts"]
}
Loading