mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 18:12:09 +08:00
feat(nx-cloud): organize workspace caching with improved input/outputs (#10734)
This commit is contained in:
13
.github/workflows/apps_automated_android.yml
vendored
13
.github/workflows/apps_automated_android.yml
vendored
@ -8,6 +8,9 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@ -19,10 +22,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 23.5.0
|
node-version: 23.5.0
|
||||||
|
|
||||||
|
- name: Derive appropriate SHAs for base and head for `nx affected` commands
|
||||||
|
uses: nrwl/nx-set-shas@v4
|
||||||
|
with:
|
||||||
|
main-branch-name: 'main'
|
||||||
|
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
@ -36,7 +45,7 @@ jobs:
|
|||||||
- name: Install NativeScript
|
- name: Install NativeScript
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip six
|
python3 -m pip install --upgrade pip six
|
||||||
npm i -g nativescript --ignore-scripts --legacy-peer-deps
|
npm i -g nativescript --ignore-scripts
|
||||||
ns usage-reporting disable
|
ns usage-reporting disable
|
||||||
ns error-reporting disable
|
ns error-reporting disable
|
||||||
|
|
||||||
@ -57,4 +66,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
api-level: 34
|
api-level: 34
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
script: node tools/scripts/run-automated.js android
|
script: npx nx test apps-automated -c=android
|
||||||
|
12
.github/workflows/apps_automated_ios.yml
vendored
12
.github/workflows/apps_automated_ios.yml
vendored
@ -8,6 +8,9 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@ -27,9 +30,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 23.5.0
|
node-version: 23.5.0
|
||||||
|
|
||||||
|
- name: Derive appropriate SHAs for base and head for `nx affected` commands
|
||||||
|
uses: nrwl/nx-set-shas@v4
|
||||||
|
with:
|
||||||
|
main-branch-name: 'main'
|
||||||
|
|
||||||
- name: Install NativeScript
|
- name: Install NativeScript
|
||||||
run: |
|
run: |
|
||||||
npm i -g nativescript --ignore-scripts --legacy-peer-deps
|
npm i -g nativescript --ignore-scripts
|
||||||
ns usage-reporting disable
|
ns usage-reporting disable
|
||||||
ns error-reporting disable
|
ns error-reporting disable
|
||||||
# ns doctor
|
# ns doctor
|
||||||
@ -47,4 +55,4 @@ jobs:
|
|||||||
os_version: '17.5'
|
os_version: '17.5'
|
||||||
|
|
||||||
- name: Run tests on iOS Simulator
|
- name: Run tests on iOS Simulator
|
||||||
run: node tools/scripts/run-automated.js ios
|
run: npx nx test apps-automated -c=ios
|
||||||
|
6
.github/workflows/npm_release_core.yml
vendored
6
.github/workflows/npm_release_core.yml
vendored
@ -9,6 +9,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
NPM_TAG: 'next'
|
NPM_TAG: 'next'
|
||||||
|
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@ -20,6 +21,11 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
run: npm run setup
|
run: npm run setup
|
||||||
|
|
||||||
|
- name: Derive appropriate SHAs for base and head for `nx affected` commands
|
||||||
|
uses: nrwl/nx-set-shas@v4
|
||||||
|
with:
|
||||||
|
main-branch-name: 'main'
|
||||||
|
|
||||||
- name: Generate Version
|
- name: Generate Version
|
||||||
working-directory: packages/core
|
working-directory: packages/core
|
||||||
run: |
|
run: |
|
||||||
|
2
.github/workflows/npm_release_tns_core.yml
vendored
2
.github/workflows/npm_release_tns_core.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
run: npm install --legacy-peer-deps
|
run: npm install
|
||||||
|
|
||||||
- name: Generate Version
|
- name: Generate Version
|
||||||
run: |
|
run: |
|
||||||
|
6
.github/workflows/npm_release_webpack.yml
vendored
6
.github/workflows/npm_release_webpack.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
run: npm install --legacy-peer-deps
|
run: npm install
|
||||||
|
|
||||||
- name: Generate Version
|
- name: Generate Version
|
||||||
working-directory: packages/webpack
|
working-directory: packages/webpack
|
||||||
@ -32,10 +32,10 @@ jobs:
|
|||||||
run: npx nx run webpack:build
|
run: npx nx run webpack:build
|
||||||
|
|
||||||
- name: Publish @nativescript/webpack
|
- name: Publish @nativescript/webpack
|
||||||
working-directory: dist/packages
|
working-directory: dist/packages/webpack5
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ../../.npmrc
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ../../.npmrc
|
||||||
echo "Publishing @nativescript/webpack@$NPM_VERSION to NPM with tag $NPM_TAG..."
|
echo "Publishing @nativescript/webpack@$NPM_VERSION to NPM with tag $NPM_TAG..."
|
||||||
npm publish nativescript-webpack.tgz --tag $NPM_TAG --dry-run
|
npm publish --tag $NPM_TAG --dry-run
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
legacy-peer-deps=true
|
|
||||||
|
|
||||||
# npm 9+ this defaults to `true` meaning `file:` dependencies are packed and then installed
|
|
||||||
# but since we want to link the source files in this case, we disable this behavior and
|
|
||||||
# opt to link the dependency as-is instead. (eg. @nativescript/core)
|
|
||||||
install-links=false
|
|
@ -14,7 +14,7 @@
|
|||||||
"@nativescript/android": "~8.8.0",
|
"@nativescript/android": "~8.8.0",
|
||||||
"@nativescript/ios": "~8.8.0",
|
"@nativescript/ios": "~8.8.0",
|
||||||
"@nativescript/visionos": "~8.8.0",
|
"@nativescript/visionos": "~8.8.0",
|
||||||
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
|
"@nativescript/webpack": "file:../../dist/packages/webpack5",
|
||||||
"circular-dependency-plugin": "^5.2.2",
|
"circular-dependency-plugin": "^5.2.2",
|
||||||
"typescript": "~5.6.0"
|
"typescript": "~5.6.0"
|
||||||
},
|
},
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@nativescript/nx:build",
|
"executor": "@nativescript/nx:build",
|
||||||
|
"inputs": ["default", "^production"],
|
||||||
"options": {
|
"options": {
|
||||||
"noHmr": true,
|
"noHmr": true,
|
||||||
"production": true,
|
"production": true,
|
||||||
@ -18,10 +19,12 @@
|
|||||||
"release": true,
|
"release": true,
|
||||||
"forDevice": true
|
"forDevice": true
|
||||||
},
|
},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"executor": "@nativescript/nx:debug",
|
"executor": "@nativescript/nx:debug",
|
||||||
|
"inputs": ["default", "^production"],
|
||||||
"options": {
|
"options": {
|
||||||
"noHmr": true,
|
"noHmr": true,
|
||||||
"debug": false,
|
"debug": false,
|
||||||
@ -30,10 +33,12 @@
|
|||||||
"forDevice": false,
|
"forDevice": false,
|
||||||
"prepare": false
|
"prepare": false
|
||||||
},
|
},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"prepare": {
|
"prepare": {
|
||||||
"executor": "@nativescript/nx:prepare",
|
"executor": "@nativescript/nx:prepare",
|
||||||
|
"inputs": ["default", "^production"],
|
||||||
"options": {
|
"options": {
|
||||||
"noHmr": true,
|
"noHmr": true,
|
||||||
"production": true,
|
"production": true,
|
||||||
@ -42,7 +47,21 @@
|
|||||||
"forDevice": true,
|
"forDevice": true,
|
||||||
"prepare": true
|
"prepare": true
|
||||||
},
|
},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"executor": "nx:run-commands",
|
||||||
|
"defaultConfiguration": "ios",
|
||||||
|
"configurations": {
|
||||||
|
"ios": {
|
||||||
|
"commands": ["node tools/scripts/run-automated.js ios"]
|
||||||
|
},
|
||||||
|
"android": {
|
||||||
|
"commands": ["node tools/scripts/run-automated.js android"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"clean": {
|
"clean": {
|
||||||
"executor": "@nativescript/nx:clean",
|
"executor": "@nativescript/nx:clean",
|
||||||
@ -54,5 +73,6 @@
|
|||||||
"lintFilePatterns": ["apps/automated/**/*.ts", "apps/automated/src/**/*.html"]
|
"lintFilePatterns": ["apps/automated/**/*.ts", "apps/automated/src/**/*.html"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"implicitDependencies": ["webpack5"]
|
||||||
}
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
legacy-peer-deps=true
|
|
@ -15,7 +15,7 @@
|
|||||||
"@nativescript/android": "~8.8.0",
|
"@nativescript/android": "~8.8.0",
|
||||||
"@nativescript/ios": "~8.8.0",
|
"@nativescript/ios": "~8.8.0",
|
||||||
"@nativescript/visionos": "~8.8.0",
|
"@nativescript/visionos": "~8.8.0",
|
||||||
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
|
"@nativescript/webpack": "file:../../dist/packages/webpack5",
|
||||||
"typescript": "~5.6.0"
|
"typescript": "~5.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
"release": true,
|
"release": true,
|
||||||
"forDevice": true
|
"forDevice": true
|
||||||
},
|
},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"executor": "@nativescript/nx:debug",
|
"executor": "@nativescript/nx:debug",
|
||||||
@ -29,7 +30,8 @@
|
|||||||
"forDevice": false,
|
"forDevice": false,
|
||||||
"prepare": false
|
"prepare": false
|
||||||
},
|
},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"prepare": {
|
"prepare": {
|
||||||
"executor": "@nativescript/nx:prepare",
|
"executor": "@nativescript/nx:prepare",
|
||||||
@ -41,7 +43,8 @@
|
|||||||
"forDevice": true,
|
"forDevice": true,
|
||||||
"prepare": true
|
"prepare": true
|
||||||
},
|
},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"clean": {
|
"clean": {
|
||||||
"executor": "@nativescript/nx:clean",
|
"executor": "@nativescript/nx:clean",
|
||||||
@ -53,5 +56,6 @@
|
|||||||
"lintFilePatterns": ["apps/toolbox/**/*.ts", "apps/toolbox/src/**/*.html"]
|
"lintFilePatterns": ["apps/toolbox/**/*.ts", "apps/toolbox/src/**/*.html"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"implicitDependencies": ["webpack5"]
|
||||||
}
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
legacy-peer-deps=true
|
|
@ -14,7 +14,7 @@
|
|||||||
"@nativescript/android": "~8.8.0",
|
"@nativescript/android": "~8.8.0",
|
||||||
"@nativescript/ios": "~8.8.0",
|
"@nativescript/ios": "~8.8.0",
|
||||||
"@nativescript/visionos": "~8.8.0",
|
"@nativescript/visionos": "~8.8.0",
|
||||||
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
|
"@nativescript/webpack": "file:../../dist/packages/webpack5",
|
||||||
"typescript": "~5.6.0"
|
"typescript": "~5.6.0"
|
||||||
},
|
},
|
||||||
"gitHead": "8ab7726d1ee9991706069c1359c552e67ee0d1a4",
|
"gitHead": "8ab7726d1ee9991706069c1359c552e67ee0d1a4",
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
"release": true,
|
"release": true,
|
||||||
"forDevice": true
|
"forDevice": true
|
||||||
},
|
},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"executor": "@nativescript/nx:debug",
|
"executor": "@nativescript/nx:debug",
|
||||||
@ -29,7 +30,8 @@
|
|||||||
"forDevice": false,
|
"forDevice": false,
|
||||||
"prepare": false
|
"prepare": false
|
||||||
},
|
},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"prepare": {
|
"prepare": {
|
||||||
"executor": "@nativescript/nx:prepare",
|
"executor": "@nativescript/nx:prepare",
|
||||||
@ -41,7 +43,8 @@
|
|||||||
"forDevice": true,
|
"forDevice": true,
|
||||||
"prepare": true
|
"prepare": true
|
||||||
},
|
},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"clean": {
|
"clean": {
|
||||||
"executor": "@nativescript/nx:clean",
|
"executor": "@nativescript/nx:clean",
|
||||||
@ -53,5 +56,6 @@
|
|||||||
"lintFilePatterns": ["apps/ui/**/*.ts", "apps/ui/src/**/*.html"]
|
"lintFilePatterns": ["apps/ui/**/*.ts", "apps/ui/src/**/*.html"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"implicitDependencies": ["webpack5"]
|
||||||
}
|
}
|
||||||
|
53
nx.json
53
nx.json
@ -69,17 +69,37 @@
|
|||||||
},
|
},
|
||||||
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
||||||
"namedInputs": {
|
"namedInputs": {
|
||||||
"default": ["{projectRoot}/**/*", "sharedGlobals"],
|
"default": [
|
||||||
"sharedGlobals": ["{workspaceRoot}/workspace.json", "{workspaceRoot}/tsconfig.json", "{workspaceRoot}/nx.json"],
|
"{projectRoot}/**/*",
|
||||||
"production": ["default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/src/test-setup.[jt]s"]
|
"sharedGlobals"
|
||||||
|
],
|
||||||
|
"sharedGlobals": [
|
||||||
|
"{workspaceRoot}/workspace.json",
|
||||||
|
"{workspaceRoot}/tsconfig.json",
|
||||||
|
"{workspaceRoot}/nx.json"
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
"default",
|
||||||
|
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
||||||
|
"!{projectRoot}/tsconfig.spec.json",
|
||||||
|
"!{projectRoot}/jest.config.[jt]s",
|
||||||
|
"!{projectRoot}/src/test-setup.[jt]s"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"targetDefaults": {
|
"targetDefaults": {
|
||||||
"build": {
|
"build": {
|
||||||
"inputs": ["production", "^production"],
|
"inputs": [
|
||||||
|
"production",
|
||||||
|
"^production"
|
||||||
|
],
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
|
"inputs": [
|
||||||
|
"default",
|
||||||
|
"^production",
|
||||||
|
"{workspaceRoot}/jest.preset.js"
|
||||||
|
],
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
@ -95,7 +115,11 @@
|
|||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"@nx/jest:jest": {
|
"@nx/jest:jest": {
|
||||||
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
|
"inputs": [
|
||||||
|
"default",
|
||||||
|
"^production",
|
||||||
|
"{workspaceRoot}/jest.preset.js"
|
||||||
|
],
|
||||||
"cache": true,
|
"cache": true,
|
||||||
"options": {
|
"options": {
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
@ -109,7 +133,10 @@
|
|||||||
},
|
},
|
||||||
"@nx/vite:test": {
|
"@nx/vite:test": {
|
||||||
"cache": true,
|
"cache": true,
|
||||||
"inputs": ["default", "^production"]
|
"inputs": [
|
||||||
|
"default",
|
||||||
|
"^production"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"useDaemonProcess": false,
|
"useDaemonProcess": false,
|
||||||
@ -119,7 +146,12 @@
|
|||||||
"useLegacyCache": true,
|
"useLegacyCache": true,
|
||||||
"release": {
|
"release": {
|
||||||
"releaseTagPattern": "{version}-{projectName}",
|
"releaseTagPattern": "{version}-{projectName}",
|
||||||
"projects": ["packages/*", "!packages/ui-mobile-base", "!packages/types-minimal", "!packages/winter-tc"],
|
"projects": [
|
||||||
|
"packages/*",
|
||||||
|
"!packages/ui-mobile-base",
|
||||||
|
"!packages/types-minimal",
|
||||||
|
"!packages/winter-tc"
|
||||||
|
],
|
||||||
"projectsRelationship": "independent",
|
"projectsRelationship": "independent",
|
||||||
"changelog": {
|
"changelog": {
|
||||||
"workspaceChangelog": false,
|
"workspaceChangelog": false,
|
||||||
@ -131,5 +163,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
"nxCloudId": "680a89d49c76d63ce41eb397"
|
||||||
|
}
|
1994
package-lock.json
generated
1994
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@ -8,7 +8,7 @@
|
|||||||
"setup": "npm run clean && npm install",
|
"setup": "npm run clean && npm install",
|
||||||
"setup:yarn": "yarn clean && yarn",
|
"setup:yarn": "yarn clean && yarn",
|
||||||
"setup:pnpm": "pnpm run clean && pnpm install",
|
"setup:pnpm": "pnpm run clean && pnpm install",
|
||||||
"postinstall": "ts-patch install && husky && nx run webpack5:build",
|
"postinstall": "ts-patch install && husky",
|
||||||
"start": "nps"
|
"start": "nps"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
@ -47,33 +47,44 @@
|
|||||||
"@typescript-eslint/parser": "^8.6.0",
|
"@typescript-eslint/parser": "^8.6.0",
|
||||||
"@vitest/coverage-v8": "^1.0.4",
|
"@vitest/coverage-v8": "^1.0.4",
|
||||||
"@vitest/ui": "^1.3.1",
|
"@vitest/ui": "^1.3.1",
|
||||||
|
"acorn-stage3": "^4.0.0",
|
||||||
"acorn": "^8.7.0",
|
"acorn": "^8.7.0",
|
||||||
|
"copy-webpack-plugin": "^9.0.0",
|
||||||
"copyfiles": "^2.4.0",
|
"copyfiles": "^2.4.0",
|
||||||
"css": "^3.0.0",
|
"css": "^3.0.0",
|
||||||
"css-tree": "^1.1.2",
|
"css-tree": "^1.1.2",
|
||||||
"css-what": "^6.1.0",
|
"css-what": "^6.1.0",
|
||||||
|
"dotenv-webpack": "^7.0.0",
|
||||||
"dotenv": "~16.4.0",
|
"dotenv": "~16.4.0",
|
||||||
"emoji-regex": "^10.3.0",
|
"emoji-regex": "^10.3.0",
|
||||||
"enhanced-resolve": "^5.8.3",
|
"enhanced-resolve": "^5.8.3",
|
||||||
"eslint": "~8.57.0",
|
"eslint": "~8.57.0",
|
||||||
"eslint-config-prettier": "~9.1.0",
|
"eslint-config-prettier": "~9.1.0",
|
||||||
|
"fork-ts-checker-webpack-plugin": "^7.0.0",
|
||||||
"gonzales": "^1.0.7",
|
"gonzales": "^1.0.7",
|
||||||
"husky": "^9.0.0",
|
"husky": "^9.0.0",
|
||||||
"jest": "~29.7.0",
|
"jest": "~29.7.0",
|
||||||
"jest-environment-jsdom": "~29.7.0",
|
"jest-environment-jsdom": "~29.7.0",
|
||||||
"jsdom": "~22.1.0",
|
"jsdom": "~22.1.0",
|
||||||
"lint-staged": "^15.2.0",
|
"lint-staged": "^15.2.0",
|
||||||
|
"loader-utils": "^2.0.0 || ^3.0.0",
|
||||||
"module-alias": "^2.2.2",
|
"module-alias": "^2.2.2",
|
||||||
"nativescript": "~8.9.0",
|
"nativescript": "~8.9.0",
|
||||||
"nativescript-typedoc-theme": "1.1.0",
|
"nativescript-typedoc-theme": "1.1.0",
|
||||||
"nx": "20.3.0",
|
"nx": "20.3.0",
|
||||||
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
|
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
|
||||||
"parserlib": "^1.1.1",
|
"parserlib": "^1.1.1",
|
||||||
|
"postcss": "^8.0.0",
|
||||||
|
"postcss-import": "^14.0.0",
|
||||||
|
"postcss-loader": "^7.0.0",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
"sass": "^1.72.0",
|
"sass": "^1.72.0",
|
||||||
"shady-css-parser": "^0.1.0",
|
"shady-css-parser": "^0.1.0",
|
||||||
|
"terser-webpack-plugin": "^5.0.0",
|
||||||
"tree-kill": "^1.2.2",
|
"tree-kill": "^1.2.2",
|
||||||
|
"ts-dedent": "^2.2.0",
|
||||||
"ts-jest": "29.2.5",
|
"ts-jest": "29.2.5",
|
||||||
|
"ts-loader": "^9.0.0",
|
||||||
"ts-node": "10.9.2",
|
"ts-node": "10.9.2",
|
||||||
"ts-patch": "^3.0.0",
|
"ts-patch": "^3.0.0",
|
||||||
"tslib": "^2.6.0",
|
"tslib": "^2.6.0",
|
||||||
@ -81,6 +92,13 @@
|
|||||||
"typescript": "~5.6.0",
|
"typescript": "~5.6.0",
|
||||||
"vite": "^5.0.0",
|
"vite": "^5.0.0",
|
||||||
"vitest": "^1.3.1",
|
"vitest": "^1.3.1",
|
||||||
|
"vue-loader": "^15.0.0 <= 15.9.8",
|
||||||
|
"webpack-bundle-analyzer": "^4.0.0",
|
||||||
|
"webpack-chain": "^6.0.0",
|
||||||
|
"webpack-cli": "^4.0.0",
|
||||||
|
"webpack-merge": "^5.0.0",
|
||||||
|
"webpack-virtual-modules": "^0.4.0",
|
||||||
|
"webpack": "^5.30.0 <= 5.50.0 || ^5.51.2",
|
||||||
"zx": "^8.3.0"
|
"zx": "^8.3.0"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
@ -88,4 +106,4 @@
|
|||||||
"npx prettier --write"
|
"npx prettier --write"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,20 +16,51 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "nx:run-commands",
|
"executor": "@nx/js:tsc",
|
||||||
"inputs": ["default", "^production"],
|
"inputs": ["default", "^production"],
|
||||||
"outputs": ["{workspaceRoot}/dist/packages"],
|
"outputs": ["{workspaceRoot}/dist/packages/core"],
|
||||||
"options": {
|
"options": {
|
||||||
"commands": [
|
"tsConfig": "{projectRoot}/tsconfig.lib.json",
|
||||||
"npx rimraf dist/packages/core",
|
"outputPath": "{workspaceRoot}/dist/packages/core",
|
||||||
"npx tsc -p packages/core/tsconfig.lib.json",
|
"rootDir": "{projectRoot}",
|
||||||
"npx copyfiles \"packages/core/**/*.d.ts\" dist && npx copyfiles \"packages/core/js-libs/**/*\" dist && npx copyfiles \"packages/core/cli-hooks/**/*.js\" dist && npx copyfiles \"packages/core/platforms/**/*\" dist && npx copyfiles \"packages/core/fetch/**/*\" dist && npx copyfiles \"packages/core/css/**/*\" dist && npx copyfiles \"packages/core/css-value/**/*\" dist",
|
"main": "{projectRoot}/index.ts",
|
||||||
"npx copyfiles -f \"packages/core/package.json\" \"packages/core/README.md\" \"LICENSE\" dist/packages/core",
|
"assets": [
|
||||||
"cd dist/packages/core && npm pack --pack-destination=.."
|
"{workspaceRoot}/LICENSE",
|
||||||
],
|
"{projectRoot}/README.md",
|
||||||
"cwd": ".",
|
"{projectRoot}/global-types.d.ts",
|
||||||
"parallel": false
|
{
|
||||||
}
|
"glob": "**/*",
|
||||||
|
"input": "{projectRoot}/js-libs/",
|
||||||
|
"output": "./js-libs/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glob": "**/*",
|
||||||
|
"input": "{projectRoot}/cli-hooks/",
|
||||||
|
"output": "./cli-hooks/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glob": "**/*",
|
||||||
|
"input": "{projectRoot}/fetch/",
|
||||||
|
"output": "./fetch/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glob": "**/*",
|
||||||
|
"input": "{projectRoot}/css/",
|
||||||
|
"output": "./css/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glob": "**/*",
|
||||||
|
"input": "{projectRoot}/css-value/",
|
||||||
|
"output": "./css-value/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glob": "**/*",
|
||||||
|
"input": "{projectRoot}/platforms/",
|
||||||
|
"output": "./platforms/"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nx/vite:test",
|
"executor": "@nx/vite:test",
|
||||||
|
@ -12,11 +12,10 @@
|
|||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"inlineSourceMap": false,
|
"inlineSourceMap": false,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"outDir": "../../dist",
|
|
||||||
"types": ["node"],
|
"types": ["node"],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"transform": "../webpack5/src/transformers/NativeClass/index.ts",
|
"transform": "./packages/webpack5/src/transformers/NativeClass/index.ts",
|
||||||
"type": "raw"
|
"type": "raw"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --project tsconfig.build.json",
|
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"copy-stubs": "mkdirp dist/stubs && cp -R src/stubs/* dist/stubs",
|
"copy-stubs": "mkdirp dist/stubs && cp -R src/stubs/* dist/stubs",
|
||||||
"prepack": "npm run test && npm run build && npm run copy-stubs && chmod +x dist/bin/index.js"
|
"prepack": "npm run test && npm run build && npm run copy-stubs && chmod +x dist/bin/index.js"
|
||||||
|
@ -12,10 +12,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "nx:run-commands",
|
"executor": "@nx/js:tsc",
|
||||||
"outputs": ["{workspaceRoot}/dist/packages"],
|
"inputs": ["default", "^production"],
|
||||||
|
"outputs": ["{workspaceRoot}/dist/packages/webpack5"],
|
||||||
"options": {
|
"options": {
|
||||||
"command": "npx zx ./tools/scripts/pack-webpack5.mjs"
|
"tsConfig": "{projectRoot}/tsconfig.lib.json",
|
||||||
|
"outputPath": "{workspaceRoot}/dist/packages/webpack5/dist",
|
||||||
|
"rootDir": "{projectRoot}/src",
|
||||||
|
"main": "{projectRoot}/src/index.ts",
|
||||||
|
"assets": [
|
||||||
|
{
|
||||||
|
"input": "{projectRoot}/src/stubs",
|
||||||
|
"glob": "*.js",
|
||||||
|
"output": "stubs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": "{projectRoot}",
|
||||||
|
"glob": "package.json",
|
||||||
|
"output": ".."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"generatePackageJson": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { IWebpackEnv } from '@nativescript/webpack';
|
import type { IWebpackEnv } from '..';
|
||||||
|
|
||||||
const ENV_FLAG_RE = /--env\.(\w+)(?:=(.+))?/;
|
const ENV_FLAG_RE = /--env\.(\w+)(?:=(.+))?/;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { defaultConfigs } from '@nativescript/webpack';
|
import { defaultConfigs } from '..';
|
||||||
import { getAllDependencies } from './dependencies';
|
import { getAllDependencies } from './dependencies';
|
||||||
import { error } from './log';
|
import { error } from './log';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { env } from '@nativescript/webpack';
|
import { env } from '..';
|
||||||
import dedent from 'ts-dedent';
|
import dedent from 'ts-dedent';
|
||||||
|
|
||||||
// de-indents strings so multi-line string literals can be used
|
// de-indents strings so multi-line string literals can be used
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"target": "es2018",
|
"target": "es2018",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"outDir": "./dist",
|
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
|
||||||
"rootDir": "./src"
|
|
||||||
},
|
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
}
|
}
|
@ -9,21 +9,20 @@ const kill = require('tree-kill');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const TIMEOUT_MS = 20 * 60 * 1000; // 20 minutes (is Github CI this slow to boot AVDs?)
|
const TIMEOUT_MS = 20 * 60 * 1000; // 20 minutes (is Github CI this slow to boot AVDs?)
|
||||||
const workspaceDir = path.resolve(__dirname, '../..');
|
const automatedAppPath = path.resolve(__dirname, '../../apps/automated');
|
||||||
const platform = process.argv[2];
|
const platform = process.argv[2];
|
||||||
const spawned_process = spawn(
|
const spawned_process = spawn(
|
||||||
"npx",
|
"ns",
|
||||||
[
|
[
|
||||||
"nx",
|
|
||||||
"debug",
|
"debug",
|
||||||
"apps-automated",
|
|
||||||
platform,
|
platform,
|
||||||
|
"--no-hmr",
|
||||||
// "--log=trace",
|
// "--log=trace",
|
||||||
// `--flags="--log=trace"`,
|
// `--flags="--log=trace"`,
|
||||||
`--timeout=${TIMEOUT_MS}`
|
`--timeout=${TIMEOUT_MS}`
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
cwd: workspaceDir,
|
cwd: automatedAppPath,
|
||||||
stdio: ["inherit", "pipe", "pipe"],
|
stdio: ["inherit", "pipe", "pipe"],
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user