Skip to content

Commit 78108f7

Browse files
authored
Merge pull request #67 from pkgjs/ci-gh
2 parents ad807ef + 803d025 commit 78108f7

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.github/workflows/ci.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
11+
test:
12+
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [ 16, 14, 12, 10 ]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- run: |
22+
git config --global user.name github-actions
23+
git config --global user.email github-actions@github.com
24+
- uses: actions/setup-node@v2
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- run: npm install
28+
- run: npm run test

lib/deps.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ internals.resolve = async ({ packageJson, lockfile }, options) => {
3131

3232
for (const dep of arborist.idealTree.inventory.values()) {
3333

34-
if (dep.root === dep) {
34+
if (dep.isProjectRoot) {
3535
// root node is not a dep, really
3636
continue;
3737
}
@@ -41,7 +41,7 @@ internals.resolve = async ({ packageJson, lockfile }, options) => {
4141
continue;
4242
}
4343

44-
if (!options.deep && ![...dep.edgesIn].some(({ from }) => from === arborist.idealTree)) {
44+
if (!options.deep && ![...dep.edgesIn].some(({ from }) => from.isProjectRoot)) {
4545
continue;
4646
}
4747

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"sinon": "^10.0.0"
3636
},
3737
"dependencies": {
38-
"@npmcli/arborist": "^2.0.0",
38+
"@npmcli/arborist": "^2.1.0",
3939
"@octokit/plugin-throttling": "^3.2.2",
4040
"@octokit/rest": "^18.0.0",
4141
"@pkgjs/nv": "0.1.0",

0 commit comments

Comments
 (0)