Skip to content
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
20 changes: 16 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -18,17 +18,29 @@
}
]
}
],
"@nx/dependency-checks": [
"error",
{
"buildTargets": ["build", "custom-build"],
"ignoredDependencies": ["lodash"],
"includeTransitiveDependencies": true,
"ignoredFiles": ["webpack.config.js", "eslint.config.js"],
"checkMissingDependencies": true,
"checkObsoleteDependencies": true,
"checkVersionMismatches": true
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db

.nx/cache
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

/dist
/coverage

/.nx/cache
13 changes: 7 additions & 6 deletions e2e/plugin-tools-e2e/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
module.exports = {
displayName: 'plugin-tools-e2e',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
globals: {},
transform: {
'^.+\\.[tj]s$': 'ts-jest',
'^.+\\.[tj]s$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
},
],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/e2e/plugin-tools-e2e',
Expand Down
16 changes: 9 additions & 7 deletions e2e/plugin-tools-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "e2e/plugin-tools-e2e/src",
"tags": [],
"implicitDependencies": ["plugin-tools"],
"targets": {
"e2e": {
"executor": "@nrwl/nx-plugin:e2e",
"executor": "@nx/jest:jest",
"options": {
"target": "plugin-tools:build",
"jestConfig": "e2e/plugin-tools-e2e/jest.config.js"
}
"jestConfig": "e2e/plugin-tools-e2e/jest.config.js",
"runInBand": true,
"passWithNoTests": false
},
"dependsOn": ["plugin-tools:build"]
}
},
"tags": [],
"implicitDependencies": ["plugin-tools"]
}
}
2 changes: 1 addition & 1 deletion e2e/plugin-tools-e2e/tests/plugin-tools.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { checkFilesExist, ensureNxProject, readJson, runNxCommandAsync, uniq } from '@nrwl/nx-plugin/testing';
import { checkFilesExist, ensureNxProject, readJson, runNxCommandAsync, uniq } from '@nx/plugin/testing';
describe('plugin-tools e2e', () => {
it('should create plugin-tools', async () => {
const plugin = uniq('plugin-tools');
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const { getJestProjects } = require('@nrwl/jest');
const { getJestProjects } = require('@nx/jest');

export default { projects: [...getJestProjects(), '<rootDir>/e2e/plugin-tools-e2e'] };
16 changes: 14 additions & 2 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
const nxPreset = require('@nrwl/jest/preset').default;
const nxPreset = require('@nx/jest/preset').default;

module.exports = { ...nxPreset };
module.exports = {
...nxPreset,
/* TODO: Update to latest Jest snapshotFormat
* By default Nx has kept the older style of Jest Snapshot formats
* to prevent breaking of any existing tests with snapshots.
* It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag.
* Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
};
40 changes: 24 additions & 16 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"npmScope": "nativescript",
"affected": {
"defaultBase": "master"
},
"workspaceLayout": {
"appsDir": "e2e",
"libsDir": "packages"
Expand All @@ -11,31 +7,43 @@
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
"inputs": ["production", "^production"],
"cache": true
},
"test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
"@nx/jest:jest": {
"cache": true,
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
},
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
}
},
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"useDaemonProcess": false,
"cacheableOperations": ["build", "build.all", "lint", "test", "e2e"],
"runtimeCacheInputs": ["node -v"],
"canTrackAnalytics": false,
"showUsageWarnings": true,
"parallel": 1
"showUsageWarnings": true
}
}
},
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [],
"production": ["default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/.eslintrc.json"]
}
"production": ["default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/.eslintrc.json", "!{projectRoot}/src/test-setup.[jt]s"]
},
"useDaemonProcess": false,
"parallel": 1,
"useInferencePlugins": false,
"defaultBase": "master"
}
55 changes: 25 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,43 +31,38 @@
"contributors": "githubcontrib --owner NativeScript --repo $(basename $(pwd)) --cols 6 --showlogin true --sortOrder desc | pbcopy"
},
"private": true,
"dependencies": {
"tslib": "^2.0.0"
},
"devDependencies": {
"@angular-devkit/schematics": "^15.0.0",
"@nrwl/cli": "15.4.1",
"@nrwl/devkit": "15.4.1",
"@nrwl/eslint-plugin-nx": "15.4.1",
"@nrwl/jest": "15.4.1",
"@nrwl/js": "15.4.1",
"@nrwl/linter": "15.4.1",
"@nrwl/node": "15.4.1",
"@nrwl/nx-cloud": "15.0.2",
"@nrwl/nx-plugin": "15.4.1",
"@nrwl/workspace": "15.4.1",
"@swc-node/register": "^1.4.2",
"@swc/core": "^1.2.173",
"@types/jest": "28.1.8",
"@types/node": "18.7.1",
"@typescript-eslint/eslint-plugin": "5.47.1",
"@typescript-eslint/parser": "5.47.1",
"@nx/devkit": "18.2.3",
"@nx/workspace": "18.2.3",
"@nx/js": "18.2.3",
"@nx/plugin": "18.2.3",
"@nx/jest": "18.2.3",
"@nx/node": "18.2.3",
"@nx/eslint-plugin": "18.2.3",
"@swc-node/register": "^1.9.0",
"@swc/core": "^1.4.0",
"@types/jest": "~29.5.0",
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "7.5.0",
"@typescript-eslint/parser": "7.5.0",
"conventional-changelog-cli": "^2.2.0",
"dotenv": "~10.0.0",
"eslint": "8.15.0",
"eslint-config-prettier": "^8.1.0",
"dotenv": "~16.4.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"github-contributors-list": "~1.2.3",
"husky": "~8.0.0",
"jest": "28.1.3",
"jsonc-parser": "3.0.0",
"nx": "15.4.1",
"husky": "~9.0.0",
"jest": "29.7.0",
"nx-cloud": "18.0.0",
"nx": "18.2.3",
"parse-version-string": "^1.0.1",
"prettier": "2.7.1",
"rxjs": "~7.8.1",
"semver": "^7.5.4",
"ts-jest": "28.0.8",
"ts-node": "10.9.1",
"ts-jest": "29.1.2",
"ts-node": "^10.9.0",
"tslib": "^2.0.0",
"typescript": "4.8.4"
"typescript": "5.4.4",
"@nx/eslint": "18.2.3"
},
"lint-staged": {
"**/*.{js,ts,scss,json,html}": [
Expand Down
9 changes: 8 additions & 1 deletion packages/plugin-tools/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
"presets": [
[
"@nx/js/babel",
{
"useBuiltIns": "usage"
}
]
]
}
7 changes: 7 additions & 0 deletions packages/plugin-tools/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
{
"files": ["*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": "error"
}
}
]
}
13 changes: 7 additions & 6 deletions packages/plugin-tools/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
export default {
displayName: 'plugin-tools',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
globals: {},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
'^.+\\.[tj]sx?$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
},
],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/packages/plugin-tools',
Expand Down
12 changes: 12 additions & 0 deletions packages/plugin-tools/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@
"version": "5.0.2",
"description": "Migrate tools to 5.0.0",
"implementation": "./src/migrations/update-5-0-0/update-5-0-0"
},
"update-to-5.1.0": {
"cli": "nx",
"version": "5.1.0",
"description": "Migrate tools to 5.1.0",
"implementation": "./src/migrations/update-5-1-0/update-5-1-0"
},
"update-to-5.2.0": {
"cli": "nx",
"version": "5.2.0",
"description": "Migrate tools to 5.2.0",
"implementation": "./src/migrations/update-5-2-0/update-5-2-0"
}
}
}
Loading