Skip to content

Commit 847964e

Browse files
committedApr 5, 2022
chore: postinstall for dependabot template-oss PR
1 parent 02a7cb7 commit 847964e

19 files changed

+287
-139
lines changed
 

‎.commitlintrc.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// This file is automatically added by @npmcli/template-oss. Do not edit.
1+
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
22

33
module.exports = {
44
extends: ['@commitlint/config-conventional'],
5-
// If you change rules be sure to also update release-please.yml
65
rules: {
7-
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'chore', 'deps']],
6+
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'deps', 'chore']],
87
'header-max-length': [2, 'always', 80],
9-
'subject-case': [2, 'always', ['lower-case', 'sentence-case', 'start-case']],
8+
'subject-case': [0, 'always', ['lower-case', 'sentence-case', 'start-case']],
109
},
1110
}

‎.eslintrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is automatically added by @npmcli/template-oss. Do not edit.
1+
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
22

33
const { readdirSync: readdir } = require('fs')
44

@@ -7,6 +7,7 @@ const localConfigs = readdir(__dirname)
77
.map((file) => `./${file}`)
88

99
module.exports = {
10+
root: true,
1011
extends: [
1112
'@npmcli',
1213
...localConfigs,

‎.github/CODEOWNERS

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
* @npm/cli-team
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
* @npm/cli-team

‎.github/ISSUE_TEMPLATE/bug.yml

+44-44
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,52 @@
33
name: Bug
44
description: File a bug/issue
55
title: "[BUG] <title>"
6-
labels: [Bug, Needs Triage]
6+
labels: [ Bug, Needs Triage ]
7+
78
body:
8-
- type: checkboxes
9-
attributes:
10-
label: Is there an existing issue for this?
11-
description: Please [search here](./issues) to see if an issue already exists for your problem.
12-
options:
13-
- label: I have searched the existing issues
14-
required: true
15-
- type: textarea
16-
attributes:
17-
label: Current Behavior
18-
description: A clear & concise description of what you're experiencing.
19-
validations:
20-
required: false
21-
- type: textarea
22-
attributes:
23-
label: Expected Behavior
24-
description: A clear & concise description of what you expected to happen.
25-
validations:
26-
required: false
27-
- type: textarea
28-
attributes:
29-
label: Steps To Reproduce
30-
description: Steps to reproduce the behavior.
31-
value: |
32-
1. In this environment...
33-
2. With this config...
34-
3. Run '...'
35-
4. See error...
36-
validations:
37-
required: false
38-
- type: textarea
39-
attributes:
40-
label: Environment
41-
description: |
42-
examples:
43-
- **npm**: 7.6.3
44-
- **Node**: 13.14.0
45-
- **OS**: Ubuntu 20.04
46-
- **platform**: Macbook Pro
47-
value: |
9+
- type: checkboxes
10+
attributes:
11+
label: Is there an existing issue for this?
12+
description: Please [search here](./issues) to see if an issue already exists for your problem.
13+
options:
14+
- label: I have searched the existing issues
15+
required: true
16+
- type: textarea
17+
attributes:
18+
label: Current Behavior
19+
description: A clear & concise description of what you're experiencing.
20+
validations:
21+
required: false
22+
- type: textarea
23+
attributes:
24+
label: Expected Behavior
25+
description: A clear & concise description of what you expected to happen.
26+
validations:
27+
required: false
28+
- type: textarea
29+
attributes:
30+
label: Steps To Reproduce
31+
description: Steps to reproduce the behavior.
32+
value: |
33+
1. In this environment...
34+
2. With this config...
35+
3. Run '...'
36+
4. See error...
37+
validations:
38+
required: false
39+
- type: textarea
40+
attributes:
41+
label: Environment
42+
description: |
43+
examples:
44+
- **npm**: 7.6.3
45+
- **Node**: 13.14.0
46+
- **OS**: Ubuntu 20.04
47+
- **platform**: Macbook Pro
48+
value: |
4849
- npm:
4950
- Node:
5051
- OS:
5152
- platform:
52-
validations:
53-
required: false
54-
53+
validations:
54+
required: false

‎.github/dependabot.yml

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# This file is automatically added by @npmcli/template-oss. Do not edit.
22

33
version: 2
4+
45
updates:
5-
- package-ecosystem: npm
6-
directory: "/"
7-
schedule:
8-
interval: daily
9-
allow:
10-
- dependency-type: direct
11-
versioning-strategy: increase-if-necessary
12-
commit-message:
13-
prefix: deps
14-
prefix-development: chore
15-
labels:
16-
- "dependencies"
6+
- package-ecosystem: npm
7+
directory: "/"
8+
schedule:
9+
interval: daily
10+
allow:
11+
- dependency-type: direct
12+
versioning-strategy: increase-if-necessary
13+
commit-message:
14+
prefix: deps
15+
prefix-development: chore
16+
labels:
17+
- "Dependencies"

‎.github/workflows/audit.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@
33
name: Audit
44

55
on:
6+
workflow_dispatch:
67
schedule:
78
# "At 01:00 on Monday" https://crontab.guru/#0_1_*_*_1
89
- cron: "0 1 * * 1"
9-
workflow_dispatch:
1010

1111
jobs:
1212
audit:
13-
name: npm audit
1413
runs-on: ubuntu-latest
1514
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v2
15+
- uses: actions/checkout@v3
16+
- name: Setup git user
17+
run: |
18+
git config --global user.email "ops+npm-cli@npmjs.com"
19+
git config --global user.name "npm cli ops bot"
20+
- uses: actions/setup-node@v3
1821
with:
19-
node-version: '16'
20-
- name: Install deps
21-
run: npm i --package-lock
22-
- name: Audit
23-
run: npm audit
22+
node-version: 16.x
23+
- name: Update npm to latest
24+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
25+
- run: npm -v
26+
- run: npm i --ignore-scripts --package-lock
27+
- run: npm audit

‎.github/workflows/ci.yml

+51-15
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,82 @@
33
name: CI
44

55
on:
6+
workflow_dispatch:
67
pull_request:
8+
branches:
9+
- '*'
710
push:
811
branches:
912
- main
1013
- latest
1114
schedule:
12-
# "At 02:00 on Monday" https://crontab.guru/#0_1_*_*_1
15+
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
1316
- cron: "0 2 * * 1"
1417

1518
jobs:
1619
lint:
1720
runs-on: ubuntu-latest
1821
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-node@v2
22+
- uses: actions/checkout@v3
23+
- name: Setup git user
24+
run: |
25+
git config --global user.email "ops+npm-cli@npmjs.com"
26+
git config --global user.name "npm cli ops bot"
27+
- uses: actions/setup-node@v3
2128
with:
22-
node-version: '16'
23-
- run: npm i --prefer-online -g npm@latest
24-
- run: npm i
29+
node-version: 16.x
30+
- name: Update npm to latest
31+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
32+
- run: npm -v
33+
- run: npm i --ignore-scripts
2534
- run: npm run lint
2635

2736
test:
2837
strategy:
2938
fail-fast: false
3039
matrix:
31-
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x]
40+
node-version:
41+
- 12.13.0
42+
- 12.x
43+
- 14.15.0
44+
- 14.x
45+
- 16.0.0
46+
- 16.x
3247
platform:
33-
- os: ubuntu-latest
34-
shell: bash
35-
- os: macos-latest
36-
shell: bash
48+
- os: ubuntu-latest
49+
shell: bash
50+
- os: macos-latest
51+
shell: bash
3752
runs-on: ${{ matrix.platform.os }}
3853
defaults:
3954
run:
4055
shell: ${{ matrix.platform.shell }}
4156
steps:
42-
- uses: actions/checkout@v2
43-
- uses: actions/setup-node@v2
57+
- uses: actions/checkout@v3
58+
- name: Setup git user
59+
run: |
60+
git config --global user.email "ops+npm-cli@npmjs.com"
61+
git config --global user.name "npm cli ops bot"
62+
- uses: actions/setup-node@v3
4463
with:
4564
node-version: ${{ matrix.node-version }}
46-
- run: npm i --prefer-online -g npm@latest
47-
- run: npm i
65+
- name: Update to workable npm (windows)
66+
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
67+
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
68+
run: |
69+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
70+
tar xf npm-7.5.4.tgz
71+
cd package
72+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
73+
cd ..
74+
rmdir /s /q package
75+
- name: Update npm to 7
76+
# If we do test on npm 10 it needs npm7
77+
if: startsWith(matrix.node-version, '10.')
78+
run: npm i --prefer-online --no-fund --no-audit -g npm@7
79+
- name: Update npm to latest
80+
if: ${{ !startsWith(matrix.node-version, '10.') }}
81+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
82+
- run: npm -v
83+
- run: npm i --ignore-scripts
4884
- run: npm test --ignore-scripts

‎.github/workflows/codeql-analysis.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: "CodeQL"
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
- latest
10+
pull_request:
11+
# The branches below must be a subset of the branches above
12+
branches:
13+
- main
14+
- latest
15+
schedule:
16+
# "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1
17+
- cron: "0 3 * * 1"
18+
19+
jobs:
20+
analyze:
21+
name: Analyze
22+
runs-on: ubuntu-latest
23+
permissions:
24+
actions: read
25+
contents: read
26+
security-events: write
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ javascript ]
32+
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: Setup git user
36+
run: |
37+
git config --global user.email "ops+npm-cli@npmjs.com"
38+
git config --global user.name "npm cli ops bot"
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v1
41+
with:
42+
languages: ${{ matrix.language }}
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v1

‎.github/workflows/post-dependabot.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Post Dependabot Actions
4+
5+
on: pull_request
6+
7+
# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps
8+
permissions:
9+
actions: write
10+
contents: write
11+
12+
jobs:
13+
Install:
14+
runs-on: ubuntu-latest
15+
if: github.actor == 'dependabot[bot]'
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Setup git user
19+
run: |
20+
git config --global user.email "ops+npm-cli@npmjs.com"
21+
git config --global user.name "npm cli ops bot"
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 16.x
25+
- name: Update npm to latest
26+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
27+
- run: npm -v
28+
- name: Dependabot metadata
29+
id: metadata
30+
uses: dependabot/fetch-metadata@v1.1.1
31+
with:
32+
github-token: "${{ secrets.GITHUB_TOKEN }}"
33+
- name: npm install and commit
34+
if: contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: |
38+
gh pr checkout ${{ github.event.pull_request.number }}
39+
npm install --ignore-scripts
40+
npm run template-oss-apply
41+
git add .
42+
git commit -am "chore: postinstall for dependabot template-oss PR"
43+
git push
44+
npm run lint

‎.github/workflows/pull-request.yml

+18-7
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,35 @@ name: Pull Request Linting
44

55
on:
66
pull_request:
7-
types: [opened, reopened, edited, synchronize]
7+
types:
8+
- opened
9+
- reopened
10+
- edited
11+
- synchronize
812

913
jobs:
1014
check:
1115
name: Check PR Title or Commits
1216
runs-on: ubuntu-latest
1317
steps:
14-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1519
with:
1620
fetch-depth: 0
17-
- uses: actions/setup-node@v2
21+
- name: Setup git user
22+
run: |
23+
git config --global user.email "ops+npm-cli@npmjs.com"
24+
git config --global user.name "npm cli ops bot"
25+
- uses: actions/setup-node@v3
1826
with:
19-
node-version: '16'
27+
node-version: 16.x
28+
- name: Update npm to latest
29+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
30+
- run: npm -v
2031
- name: Install deps
21-
run: |
22-
npm i -D @commitlint/cli @commitlint/config-conventional
32+
run: npm i -D @commitlint/cli @commitlint/config-conventional
2333
- name: Check commits OR PR title
2434
env:
2535
PR_TITLE: ${{ github.event.pull_request.title }}
2636
run: |
27-
npx commitlint -x @commitlint/config-conventional -V --from origin/main --to ${{ github.event.pull_request.head.sha }} || echo $PR_TITLE | npx commitlint -x @commitlint/config-conventional -V
37+
npx --offline commitlint -V --from origin/main --to ${{ github.event.pull_request.head.sha }} \
38+
|| echo $PR_TITLE | npx --offline commitlint -V

‎.github/workflows/release-please.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@ on:
66
push:
77
branches:
88
- main
9+
- latest
910

1011
jobs:
1112
release-please:
1213
runs-on: ubuntu-latest
1314
steps:
14-
- uses: google-github-actions/release-please-action@v2
15+
- uses: google-github-actions/release-please-action@v3
1516
id: release
1617
with:
17-
package-name: conventional-test
1818
release-type: node
19-
# If you change changelog-types be sure to also update commitlintrc.js
2019
changelog-types: >
21-
[{"type":"feat","section":"Features","hidden":false},
22-
{"type":"fix","section":"Bug Fixes","hidden":false},
23-
{"type":"docs","section":"Documentation","hidden":false},
24-
{"type":"deps","section":"dependencies","hidden":false},
25-
{"type":"chore","hidden":true}]
20+
[
21+
{"type":"feat","section":"Features","hidden":false},
22+
{"type":"fix","section":"Bug Fixes","hidden":false},
23+
{"type":"docs","section":"Documentation","hidden":false},
24+
{"type":"deps","section":"Dependencies","hidden":false},
25+
{"type":"chore","hidden":true}
26+
]

‎.gitignore

+14-12
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@
44
/*
55

66
# keep these
7-
!/.commitlintrc.js
8-
!/.npmrc
9-
!/.eslintrc*
10-
!/.github
7+
!/.eslintrc.local.*
118
!**/.gitignore
12-
!/package.json
13-
!/docs
14-
!/bin
15-
!/lib
9+
!/docs/
10+
!/tap-snapshots/
11+
!/test/
1612
!/map.js
17-
!/tap-snapshots
18-
!/test
19-
!/scripts
13+
!/scripts/
2014
!/README*
2115
!/LICENSE*
22-
!/SECURITY*
2316
!/CHANGELOG*
17+
!/.commitlintrc.js
18+
!/.eslintrc.js
19+
!/.github/
20+
!/.gitignore
21+
!/.npmrc
22+
!/SECURITY.md
23+
!/bin/
24+
!/lib/
25+
!/package.json

‎.npmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
;This file is automatically added by @npmcli/template-oss. Do not edit.
1+
; This file is automatically added by @npmcli/template-oss. Do not edit.
22

33
package-lock=false

‎CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Change Log
1+
# Changelog
22

33
## [3.0.0](https://www.github.com/npm/bin-links/compare/v2.3.0...v3.0.0) (2022-01-18)
44

‎lib/check-bin.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ const checkShim = async ({ target, path }) => {
5757
target + '.cmd',
5858
target + '.ps1',
5959
]
60-
await Promise.all(shims.map(async target => {
61-
const current = await readCmdShim(target)
62-
.catch(er => handleReadCmdShimError({ er, target }))
60+
await Promise.all(shims.map(async shim => {
61+
const current = await readCmdShim(shim)
62+
.catch(er => handleReadCmdShimError({ er, target: shim }))
6363

6464
if (!current) {
6565
return
6666
}
6767

68-
const resolved = resolve(dirname(target), current.replace(/\\/g, '/'))
68+
const resolved = resolve(dirname(shim), current.replace(/\\/g, '/'))
6969

7070
if (resolved.toLowerCase().indexOf(path.toLowerCase()) !== 0) {
71-
return failEEXIST({ target })
71+
return failEEXIST({ target: shim })
7272
}
7373
}))
7474
}

‎package.json

+12-9
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
"prepublishOnly": "git push origin --follow-tags",
1010
"snap": "tap",
1111
"test": "tap",
12-
"lint": "eslint '**/*.js'",
13-
"postlint": "npm-template-check",
12+
"lint": "eslint \"**/*.js\"",
13+
"postlint": "template-oss-check",
1414
"lintfix": "npm run lint -- --fix",
15-
"posttest": "npm run lint"
15+
"posttest": "npm run lint",
16+
"template-oss-apply": "template-oss-apply --force"
1617
},
1718
"repository": {
1819
"type": "git",
19-
"url": "git://github.com/npm/bin-links.git"
20+
"url": "https://github.com/npm/bin-links.git"
2021
},
2122
"keywords": [
2223
"npm",
@@ -33,7 +34,8 @@
3334
"write-file-atomic": "^4.0.0"
3435
},
3536
"devDependencies": {
36-
"@npmcli/template-oss": "^3.2.2",
37+
"@npmcli/eslint-config": "^3.0.1",
38+
"@npmcli/template-oss": "3.2.2",
3739
"mkdirp": "^1.0.3",
3840
"require-inject": "^1.4.4",
3941
"tap": "^15.0.10"
@@ -43,15 +45,16 @@
4345
"coverage-map": "map.js"
4446
},
4547
"files": [
46-
"bin",
47-
"lib"
48+
"bin/",
49+
"lib/"
4850
],
4951
"engines": {
50-
"node": "^12.13.0 || ^14.15.0 || >=16"
52+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
5153
},
5254
"author": "GitHub Inc.",
5355
"templateOSS": {
56+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
5457
"windowsCI": false,
55-
"version": "2.5.0"
58+
"version": "3.2.2"
5659
}
5760
}

‎test/fix-bin.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ t.test('failure to read means not a windows hash bang file', t => {
3737
process.nextTick(() => cb(new Error('witaf')))
3838
},
3939
}
40-
const fixBin = requireInject('../lib/fix-bin.js', {
40+
const mockedFixBin = requireInject('../lib/fix-bin.js', {
4141
fs: fsMock,
4242
})
4343

4444
const dir = t.testdir({
4545
whb: `#!/usr/bin/env node\r\nconsole.log('hello')\r\n`,
4646
})
4747
chmodSync(`${dir}/whb`, 0o644)
48-
return fixBin(`${dir}/whb`).then(() => {
48+
return mockedFixBin(`${dir}/whb`).then(() => {
4949
t.equal((statSync(`${dir}/whb`).mode & 0o777), 0o777 & (~umask), 'has exec perms')
5050
t.equal(readFileSync(`${dir}/whb`, 'utf8'),
5151
/* eslint-disable-next-line max-len */
@@ -61,15 +61,15 @@ t.test('failure to close is ignored', t => {
6161
process.nextTick(() => cb(new Error('witaf')))
6262
},
6363
}
64-
const fixBin = requireInject('../lib/fix-bin.js', {
64+
const mockedFixBin = requireInject('../lib/fix-bin.js', {
6565
fs: fsMock,
6666
})
6767

6868
const dir = t.testdir({
6969
whb: `#!/usr/bin/env node\r\nconsole.log('hello')\r\n`,
7070
})
7171
chmodSync(`${dir}/whb`, 0o644)
72-
return fixBin(`${dir}/whb`).then(() => {
72+
return mockedFixBin(`${dir}/whb`).then(() => {
7373
t.equal((statSync(`${dir}/whb`).mode & 0o777), 0o777 & (~umask), 'has exec perms')
7474
t.equal(readFileSync(`${dir}/whb`, 'utf8'),
7575
/* eslint-disable-next-line max-len */

‎test/link-gently.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ t.test('racey race', async t => {
9696
setTimeout(() => fs.symlink(path, dest, type, cb), 200)
9797
},
9898
}
99-
const linkGently = requireInject('../lib/link-gently.js', {
99+
const mockedLinkGently = requireInject('../lib/link-gently.js', {
100100
fs: fsMock,
101101
})
102102
const dir = t.testdir({
@@ -110,14 +110,14 @@ t.test('racey race', async t => {
110110
existingFile: 'hello',
111111
})
112112
return Promise.all([
113-
linkGently({
113+
mockedLinkGently({
114114
path: `${dir}/pkg`,
115115
from: `./pkg/hello.js`,
116116
to: `${dir}/racecar`,
117117
absFrom: `${dir}/pkg/hello.js`,
118118
force: true,
119119
}),
120-
linkGently({
120+
mockedLinkGently({
121121
path: `${dir}/otherpkg`,
122122
from: `./otherpkg/hello.js`,
123123
to: `${dir}/racecar`,

‎test/shim-bin.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ t.test('eperm on stat', async t => {
8686
mkdirp,
8787
fs: {
8888
...fs,
89-
lstat: (path, cb) => cb(Object.assign(new Error('wakawaka'), {
89+
lstat: (_, cb) => cb(Object.assign(new Error('wakawaka'), {
9090
code: 'EPERM',
9191
})),
9292
},
@@ -114,7 +114,7 @@ t.test('strange enoent from read-cmd-shim', async t => {
114114
const shimBin = requireInject('../lib/shim-bin.js', {
115115
path,
116116
mkdirp,
117-
'read-cmd-shim': path => Promise.reject(Object.assign(new Error('xyz'), {
117+
'read-cmd-shim': () => Promise.reject(Object.assign(new Error('xyz'), {
118118
code: 'ENOENT',
119119
})),
120120
})
@@ -164,7 +164,7 @@ t.test('unknown error from read-cmd-shim', async t => {
164164
const shimBin = requireInject('../lib/shim-bin.js', {
165165
path,
166166
mkdirp,
167-
'read-cmd-shim': path => Promise.reject(Object.assign(new Error('xyz'), {
167+
'read-cmd-shim': () => Promise.reject(Object.assign(new Error('xyz'), {
168168
code: 'ELDERGAWDS',
169169
})),
170170
})

0 commit comments

Comments
 (0)
Please sign in to comment.