Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@github.com>2021-11-16 21:27:55 +0300
committerNathan Fritz <fritzy@github.com>2021-11-18 22:43:26 +0300
commit44e39ce7042a162f53a708ee4660e84638a66f6b (patch)
tree79af3760604b7ce37e3c733a5aeb3726531ae9c6
parentea2906ca32bda348b2833458729dc52081d64cf2 (diff)
separate github actions for workspaces
PR-URL: https://github.com/npm/cli/pull/4050 Credit: @fritzy Close: #4050 Reviewed-by: @wraithgar PR-URL: https://github.com/npm/cli/pull/4050 Credit: @fritzy Close: #4050 Reviewed-by: @wraithgar
-rw-r--r--.github/workflows/ci-docs.yml52
-rw-r--r--.github/workflows/ci-libnpmdiff.yml76
-rw-r--r--.github/workflows/ci.yml46
-rw-r--r--docs/package.json4
l---------node_modules/libnpmdiff2
-rw-r--r--package-lock.json28
-rw-r--r--package.json4
-rw-r--r--workspaces/libnpmdiff/.eslintrc.json (renamed from packages/libnpmdiff/.eslintrc.json)0
-rw-r--r--workspaces/libnpmdiff/.gitignore (renamed from packages/libnpmdiff/.gitignore)0
-rw-r--r--workspaces/libnpmdiff/CHANGELOG.md (renamed from packages/libnpmdiff/CHANGELOG.md)0
-rw-r--r--workspaces/libnpmdiff/LICENSE (renamed from packages/libnpmdiff/LICENSE)0
-rw-r--r--workspaces/libnpmdiff/README.md (renamed from packages/libnpmdiff/README.md)0
-rw-r--r--workspaces/libnpmdiff/index.js (renamed from packages/libnpmdiff/index.js)0
-rw-r--r--workspaces/libnpmdiff/lib/format-diff.js (renamed from packages/libnpmdiff/lib/format-diff.js)0
-rw-r--r--workspaces/libnpmdiff/lib/should-print-patch.js (renamed from packages/libnpmdiff/lib/should-print-patch.js)0
-rw-r--r--workspaces/libnpmdiff/lib/tarball.js (renamed from packages/libnpmdiff/lib/tarball.js)0
-rw-r--r--workspaces/libnpmdiff/lib/untar.js (renamed from packages/libnpmdiff/lib/untar.js)0
-rw-r--r--workspaces/libnpmdiff/package.json (renamed from packages/libnpmdiff/package.json)0
-rw-r--r--workspaces/libnpmdiff/tap-snapshots/test/format-diff.js.test.cjs (renamed from packages/libnpmdiff/tap-snapshots/test/format-diff.js.test.cjs)0
-rw-r--r--workspaces/libnpmdiff/tap-snapshots/test/index.js.test.cjs (renamed from packages/libnpmdiff/tap-snapshots/test/index.js.test.cjs)0
-rw-r--r--workspaces/libnpmdiff/tap-snapshots/test/untar.js.test.cjs (renamed from packages/libnpmdiff/tap-snapshots/test/untar.js.test.cjs)0
-rw-r--r--workspaces/libnpmdiff/test/fixtures/archive.tgz (renamed from packages/libnpmdiff/test/fixtures/archive.tgz)bin74564 -> 74564 bytes
-rw-r--r--workspaces/libnpmdiff/test/fixtures/ruyadorno-simplistic-pkg-with-folders-1.0.0.tgz (renamed from packages/libnpmdiff/test/fixtures/ruyadorno-simplistic-pkg-with-folders-1.0.0.tgz)bin573 -> 573 bytes
-rw-r--r--workspaces/libnpmdiff/test/fixtures/simple-output-2.2.1.tgz (renamed from packages/libnpmdiff/test/fixtures/simple-output-2.2.1.tgz)bin2227 -> 2227 bytes
-rw-r--r--workspaces/libnpmdiff/test/format-diff.js (renamed from packages/libnpmdiff/test/format-diff.js)0
-rw-r--r--workspaces/libnpmdiff/test/index.js (renamed from packages/libnpmdiff/test/index.js)0
-rw-r--r--workspaces/libnpmdiff/test/should-print-patch.js (renamed from packages/libnpmdiff/test/should-print-patch.js)0
-rw-r--r--workspaces/libnpmdiff/test/tarball.js (renamed from packages/libnpmdiff/test/tarball.js)0
-rw-r--r--workspaces/libnpmdiff/test/untar.js (renamed from packages/libnpmdiff/test/untar.js)0
29 files changed, 162 insertions, 50 deletions
diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml
new file mode 100644
index 000000000..67a075227
--- /dev/null
+++ b/.github/workflows/ci-docs.yml
@@ -0,0 +1,52 @@
+name: Node CI docs
+
+on:
+ pull_request:
+ paths:
+ - docs/**
+ branches:
+ - '*'
+ push:
+ paths:
+ - docs/**
+ branches:
+ - release-next
+ - latest
+ workflow_dispatch:
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ # Checkout the npm/cli repo
+ - uses: actions/checkout@v2
+ - name: Use Node.js 14.x
+ uses: actions/setup-node@v2
+ with:
+ node-version: 14.x
+ cache: npm
+ - name: Install dependencies
+ run: |
+ node ./bin/npm-cli.js install --ignore-scripts --no-audit
+ node ./bin/npm-cli.js rebuild
+ - name: Run linting
+ run: node ./bin/npm-cli.js run lint -w docs
+ env:
+ DEPLOY_VERSION: testing
+
+ check_docs:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js 14.x
+ uses: actions/setup-node@v2
+ with:
+ node-version: 14.x
+ cache: npm
+ - name: Install dependencies
+ run: |
+ node ./bin/npm-cli.js install --ignore-scripts --no-audit
+ - name: Rebuild the docs
+ run: make freshdocs
+ - name: Git should not be dirty
+ run: node scripts/git-dirty.js
diff --git a/.github/workflows/ci-libnpmdiff.yml b/.github/workflows/ci-libnpmdiff.yml
new file mode 100644
index 000000000..5f8a20f64
--- /dev/null
+++ b/.github/workflows/ci-libnpmdiff.yml
@@ -0,0 +1,76 @@
+name: Node CI libnpmdiff
+
+on:
+ pull_request:
+ paths:
+ - workspaces/libnpmdiff/**
+ branches:
+ - '*'
+ push:
+ paths:
+ - workspaces/libnpmdiff/**
+ branches:
+ - release-next
+ - latest
+ workflow_dispatch:
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ # Checkout the npm/cli repo
+ - uses: actions/checkout@v2
+ - name: Use Node.js 14.x
+ uses: actions/setup-node@v2
+ with:
+ node-version: 14.x
+ cache: npm
+ - name: Install dependencies
+ run: |
+ node ./bin/npm-cli.js install --ignore-scripts --no-audit
+ node ./bin/npm-cli.js rebuild
+ - name: Run linting
+ run: node ./bin/npm-cli.js run posttest -w libnpmdiff
+ env:
+ DEPLOY_VERSION: testing
+
+ test:
+ strategy:
+ fail-fast: false
+ matrix:
+ node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
+ platform:
+ - os: ubuntu-latest
+ shell: bash
+ - os: macos-latest
+ shell: bash
+ - os: windows-latest
+ shell: bash
+ - os: windows-latest
+ shell: powershell
+
+ runs-on: ${{ matrix.platform.os }}
+ defaults:
+ run:
+ shell: ${{ matrix.platform.shell }}
+
+ steps:
+ # Checkout the npm/cli repo
+ - uses: actions/checkout@v2
+
+ # Installs the specific version of Node.js
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v2
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: npm
+
+ # Run the installer script
+ - name: Install dependencies
+ run: |
+ node ./bin/npm-cli.js install --ignore-scripts --no-audit
+ node ./bin/npm-cli.js rebuild
+
+ # Run the tests, but not if we're just gonna do coveralls later anyway
+ - name: Run Tap tests
+ run: node ./bin/npm-cli.js run -w libnpmdiff --ignore-scripts test -- -t600 -Rbase -c
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3fba2a3ba..473e30f37 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,6 +8,8 @@ on:
branches:
- release-next
- latest
+ workflow_dispatch:
+
jobs:
lint:
runs-on: ubuntu-latest
@@ -106,49 +108,7 @@ jobs:
env:
DEPLOY_VERSION: testing
- workspaces-tests:
- strategy:
- fail-fast: false
- matrix:
- node-version: [12.x, 14.x, 16.x]
- platform:
- - os: ubuntu-latest
- shell: bash
- - os: macos-latest
- shell: bash
- - os: windows-latest
- shell: bash
- - os: windows-latest
- shell: powershell
-
- runs-on: ${{ matrix.platform.os }}
- defaults:
- run:
- shell: ${{ matrix.platform.shell }}
-
- steps:
- # Checkout the npm/cli repo
- - uses: actions/checkout@v2
-
- # Installs the specific version of Node.js
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v2
- with:
- node-version: ${{ matrix.node-version }}
- cache: npm
-
- # Run the installer script
- - name: Install dependencies
- run: |
- node ./bin/npm-cli.js install --ignore-scripts --no-audit
- node ./bin/npm-cli.js rebuild
-
- - name: Run workspaces tests
- run: node ./bin/npm-cli.js test -w ./packages -- --no-check-coverage -t600 -Rbase -c
- env:
- DEPLOY_VERSION: testing
-
- build:
+ test:
strategy:
fail-fast: false
matrix:
diff --git a/docs/package.json b/docs/package.json
index e48785bdb..9e594a12f 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -3,7 +3,9 @@
"description": "The npm cli documentation",
"version": "1.0.0",
"scripts": {
- "build": "node dockhand"
+ "build": "node dockhand",
+ "eslint": "eslint",
+ "lint": "npm run eslint -- ./*.js"
},
"repository": {
"type": "git",
diff --git a/node_modules/libnpmdiff b/node_modules/libnpmdiff
index ae8dd6289..70ab2f9c6 120000
--- a/node_modules/libnpmdiff
+++ b/node_modules/libnpmdiff
@@ -1 +1 @@
-../packages/libnpmdiff \ No newline at end of file
+../workspaces/libnpmdiff \ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index d679c9437..421ee2841 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -82,7 +82,7 @@
"license": "Artistic-2.0",
"workspaces": [
"docs",
- "packages/*"
+ "workspaces/*"
],
"dependencies": {
"@isaacs/string-locale-compare": "^1.1.0",
@@ -4532,7 +4532,7 @@
}
},
"node_modules/libnpmdiff": {
- "resolved": "packages/libnpmdiff",
+ "resolved": "workspaces/libnpmdiff",
"link": true
},
"node_modules/libnpmexec": {
@@ -10045,6 +10045,28 @@
},
"packages/libnpmdiff": {
"version": "2.0.4",
+ "extraneous": true,
+ "license": "ISC",
+ "dependencies": {
+ "@npmcli/disparity-colors": "^1.0.1",
+ "@npmcli/installed-package-contents": "^1.0.7",
+ "binary-extensions": "^2.2.0",
+ "diff": "^5.0.0",
+ "minimatch": "^3.0.4",
+ "npm-package-arg": "^8.1.4",
+ "pacote": "^12.0.0",
+ "tar": "^6.1.0"
+ },
+ "devDependencies": {
+ "eslint": "^8.1.0",
+ "tap": "^15.0.9"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "workspaces/libnpmdiff": {
+ "version": "2.0.4",
"license": "ISC",
"dependencies": {
"@npmcli/disparity-colors": "^1.0.1",
@@ -13321,7 +13343,7 @@
}
},
"libnpmdiff": {
- "version": "file:packages/libnpmdiff",
+ "version": "file:workspaces/libnpmdiff",
"requires": {
"@npmcli/disparity-colors": "^1.0.1",
"@npmcli/installed-package-contents": "^1.0.7",
diff --git a/package.json b/package.json
index 02ee5c387..541bd3892 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"description": "a package manager for JavaScript",
"workspaces": [
"docs",
- "packages/*"
+ "workspaces/*"
],
"files": [
"index.js",
@@ -217,7 +217,7 @@
"sudotest:nocleanup": "sudo NO_TEST_CLEANUP=1 npm run test --",
"posttest": "npm run lint",
"eslint": "eslint",
- "lint": "npm run eslint -- bin docs lib scripts smoke-tests test ./*.js",
+ "lint": "npm run eslint -- bin lib scripts smoke-tests test ./*.js",
"lintfix": "npm run lint -- --fix",
"prelint": "rimraf test/npm_cache*",
"resetdeps": "bash scripts/resetdeps.sh",
diff --git a/packages/libnpmdiff/.eslintrc.json b/workspaces/libnpmdiff/.eslintrc.json
index b39431d2c..b39431d2c 100644
--- a/packages/libnpmdiff/.eslintrc.json
+++ b/workspaces/libnpmdiff/.eslintrc.json
diff --git a/packages/libnpmdiff/.gitignore b/workspaces/libnpmdiff/.gitignore
index 0aba557bf..0aba557bf 100644
--- a/packages/libnpmdiff/.gitignore
+++ b/workspaces/libnpmdiff/.gitignore
diff --git a/packages/libnpmdiff/CHANGELOG.md b/workspaces/libnpmdiff/CHANGELOG.md
index b93b15b7b..b93b15b7b 100644
--- a/packages/libnpmdiff/CHANGELOG.md
+++ b/workspaces/libnpmdiff/CHANGELOG.md
diff --git a/packages/libnpmdiff/LICENSE b/workspaces/libnpmdiff/LICENSE
index d3a1cdfd2..d3a1cdfd2 100644
--- a/packages/libnpmdiff/LICENSE
+++ b/workspaces/libnpmdiff/LICENSE
diff --git a/packages/libnpmdiff/README.md b/workspaces/libnpmdiff/README.md
index 6c60f714b..6c60f714b 100644
--- a/packages/libnpmdiff/README.md
+++ b/workspaces/libnpmdiff/README.md
diff --git a/packages/libnpmdiff/index.js b/workspaces/libnpmdiff/index.js
index 6e68e6c4c..6e68e6c4c 100644
--- a/packages/libnpmdiff/index.js
+++ b/workspaces/libnpmdiff/index.js
diff --git a/packages/libnpmdiff/lib/format-diff.js b/workspaces/libnpmdiff/lib/format-diff.js
index 211386cb5..211386cb5 100644
--- a/packages/libnpmdiff/lib/format-diff.js
+++ b/workspaces/libnpmdiff/lib/format-diff.js
diff --git a/packages/libnpmdiff/lib/should-print-patch.js b/workspaces/libnpmdiff/lib/should-print-patch.js
index a95481140..a95481140 100644
--- a/packages/libnpmdiff/lib/should-print-patch.js
+++ b/workspaces/libnpmdiff/lib/should-print-patch.js
diff --git a/packages/libnpmdiff/lib/tarball.js b/workspaces/libnpmdiff/lib/tarball.js
index 4d01d69c9..4d01d69c9 100644
--- a/packages/libnpmdiff/lib/tarball.js
+++ b/workspaces/libnpmdiff/lib/tarball.js
diff --git a/packages/libnpmdiff/lib/untar.js b/workspaces/libnpmdiff/lib/untar.js
index 16b69ab8f..16b69ab8f 100644
--- a/packages/libnpmdiff/lib/untar.js
+++ b/workspaces/libnpmdiff/lib/untar.js
diff --git a/packages/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json
index 129d9b90c..129d9b90c 100644
--- a/packages/libnpmdiff/package.json
+++ b/workspaces/libnpmdiff/package.json
diff --git a/packages/libnpmdiff/tap-snapshots/test/format-diff.js.test.cjs b/workspaces/libnpmdiff/tap-snapshots/test/format-diff.js.test.cjs
index f735d8925..f735d8925 100644
--- a/packages/libnpmdiff/tap-snapshots/test/format-diff.js.test.cjs
+++ b/workspaces/libnpmdiff/tap-snapshots/test/format-diff.js.test.cjs
diff --git a/packages/libnpmdiff/tap-snapshots/test/index.js.test.cjs b/workspaces/libnpmdiff/tap-snapshots/test/index.js.test.cjs
index 21db3deac..21db3deac 100644
--- a/packages/libnpmdiff/tap-snapshots/test/index.js.test.cjs
+++ b/workspaces/libnpmdiff/tap-snapshots/test/index.js.test.cjs
diff --git a/packages/libnpmdiff/tap-snapshots/test/untar.js.test.cjs b/workspaces/libnpmdiff/tap-snapshots/test/untar.js.test.cjs
index b1092feb6..b1092feb6 100644
--- a/packages/libnpmdiff/tap-snapshots/test/untar.js.test.cjs
+++ b/workspaces/libnpmdiff/tap-snapshots/test/untar.js.test.cjs
diff --git a/packages/libnpmdiff/test/fixtures/archive.tgz b/workspaces/libnpmdiff/test/fixtures/archive.tgz
index 843a61123..843a61123 100644
--- a/packages/libnpmdiff/test/fixtures/archive.tgz
+++ b/workspaces/libnpmdiff/test/fixtures/archive.tgz
Binary files differ
diff --git a/packages/libnpmdiff/test/fixtures/ruyadorno-simplistic-pkg-with-folders-1.0.0.tgz b/workspaces/libnpmdiff/test/fixtures/ruyadorno-simplistic-pkg-with-folders-1.0.0.tgz
index 11bbb44c4..11bbb44c4 100644
--- a/packages/libnpmdiff/test/fixtures/ruyadorno-simplistic-pkg-with-folders-1.0.0.tgz
+++ b/workspaces/libnpmdiff/test/fixtures/ruyadorno-simplistic-pkg-with-folders-1.0.0.tgz
Binary files differ
diff --git a/packages/libnpmdiff/test/fixtures/simple-output-2.2.1.tgz b/workspaces/libnpmdiff/test/fixtures/simple-output-2.2.1.tgz
index 8d442f4c1..8d442f4c1 100644
--- a/packages/libnpmdiff/test/fixtures/simple-output-2.2.1.tgz
+++ b/workspaces/libnpmdiff/test/fixtures/simple-output-2.2.1.tgz
Binary files differ
diff --git a/packages/libnpmdiff/test/format-diff.js b/workspaces/libnpmdiff/test/format-diff.js
index f2fc7c77d..f2fc7c77d 100644
--- a/packages/libnpmdiff/test/format-diff.js
+++ b/workspaces/libnpmdiff/test/format-diff.js
diff --git a/packages/libnpmdiff/test/index.js b/workspaces/libnpmdiff/test/index.js
index 80b3daaa6..80b3daaa6 100644
--- a/packages/libnpmdiff/test/index.js
+++ b/workspaces/libnpmdiff/test/index.js
diff --git a/packages/libnpmdiff/test/should-print-patch.js b/workspaces/libnpmdiff/test/should-print-patch.js
index 97b15787d..97b15787d 100644
--- a/packages/libnpmdiff/test/should-print-patch.js
+++ b/workspaces/libnpmdiff/test/should-print-patch.js
diff --git a/packages/libnpmdiff/test/tarball.js b/workspaces/libnpmdiff/test/tarball.js
index 3a959be6e..3a959be6e 100644
--- a/packages/libnpmdiff/test/tarball.js
+++ b/workspaces/libnpmdiff/test/tarball.js
diff --git a/packages/libnpmdiff/test/untar.js b/workspaces/libnpmdiff/test/untar.js
index 62be1c6ba..62be1c6ba 100644
--- a/packages/libnpmdiff/test/untar.js
+++ b/workspaces/libnpmdiff/test/untar.js