Skip to content

Commit

Permalink
chore: use old packlist for bundle ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys authored and wraithgar committed Nov 1, 2022
1 parent 5fc516b commit a4e2b78
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 78 deletions.
10 changes: 5 additions & 5 deletions node_modules/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
!/https-proxy-agent
!/humanize-ms
!/iconv-lite
!/ignore-walk
!/imurmurhash
!/indent-string
!/infer-owner
Expand Down Expand Up @@ -164,6 +165,10 @@
!/npm-install-checks
!/npm-normalize-package-bin
!/npm-package-arg
!/npm-packlist
!/npm-packlist/node_modules/
/npm-packlist/node_modules/*
!/npm-packlist/node_modules/npm-normalize-package-bin
!/npm-pick-manifest
!/npm-pick-manifest/node_modules/
/npm-pick-manifest/node_modules/*
Expand All @@ -176,11 +181,6 @@
!/opener
!/p-map
!/pacote
!/pacote/node_modules/
/pacote/node_modules/*
!/pacote/node_modules/ignore-walk
!/pacote/node_modules/npm-normalize-package-bin
!/pacote/node_modules/npm-packlist
!/parse-conflict-json
!/path-is-absolute
!/postcss-selector-parser
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
89 changes: 27 additions & 62 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"@npmcli/template-oss": "4.7.1",
"licensee": "^8.2.0",
"nock": "^13.2.4",
"npm-packlist": "^7.0.1",
"npm-packlist": "^5.1.3",
"spawk": "^1.7.1",
"tap": "^16.0.1"
},
Expand Down Expand Up @@ -208,17 +208,6 @@
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"docs/node_modules/ignore-walk": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz",
"integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==",
"dependencies": {
"minimatch": "^5.0.1"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/@actions/core": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
Expand Down Expand Up @@ -6138,15 +6127,15 @@
}
},
"node_modules/ignore-walk": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz",
"integrity": "sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==",
"dev": true,
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz",
"integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==",
"inBundle": true,
"dependencies": {
"minimatch": "^5.0.1"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/import-fresh": {
Expand Down Expand Up @@ -8031,15 +8020,30 @@
}
},
"node_modules/npm-packlist": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.1.tgz",
"integrity": "sha512-XddbYutimy7hdmP7S1tHMjFwghn64lvgdnhYG0KLGFBWjEvMt1/jg95OR3vPNNCjkakHS+k4a//3XOO8JOGI2A==",
"dev": true,
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz",
"integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==",
"inBundle": true,
"dependencies": {
"ignore-walk": "^6.0.0"
"glob": "^8.0.1",
"ignore-walk": "^5.0.1",
"npm-bundled": "^2.0.0",
"npm-normalize-package-bin": "^2.0.0"
},
"bin": {
"npm-packlist": "bin/index.js"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/npm-packlist/node_modules/npm-normalize-package-bin": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz",
"integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==",
"inBundle": true,
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/npm-pick-manifest": {
Expand Down Expand Up @@ -8609,45 +8613,6 @@
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/pacote/node_modules/ignore-walk": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz",
"integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==",
"inBundle": true,
"dependencies": {
"minimatch": "^5.0.1"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/pacote/node_modules/npm-normalize-package-bin": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz",
"integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==",
"inBundle": true,
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/pacote/node_modules/npm-packlist": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz",
"integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==",
"inBundle": true,
"dependencies": {
"glob": "^8.0.1",
"ignore-walk": "^5.0.1",
"npm-bundled": "^2.0.0",
"npm-normalize-package-bin": "^2.0.0"
},
"bin": {
"npm-packlist": "bin/index.js"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
"@npmcli/template-oss": "4.7.1",
"licensee": "^8.2.0",
"nock": "^13.2.4",
"npm-packlist": "^7.0.1",
"npm-packlist": "^5.1.3",
"spawk": "^1.7.1",
"tap": "^16.0.1"
},
Expand Down
5 changes: 2 additions & 3 deletions scripts/create-node-pr.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const { join } = require('path')
const fsp = require('fs/promises')
const hgi = require('hosted-git-info')
const semver = require('semver')
const pacote = require('pacote')
const log = require('proc-log')
const tar = require('tar')
const { cp, withTempDir } = require('@npmcli/fs')
const { cp, withTempDir, access, constants } = require('@npmcli/fs')
const { CWD, run, spawn, git, fs, gh } = require('./util.js')

// this script expects node to already be cloned to a directory at the cli root named "node"
Expand Down Expand Up @@ -65,7 +64,7 @@ const main = async (spec, opts) => withTempDir(CWD, async (tmpDir) => {
tag: skipCheckout ? null : head.tag,
})

await fsp.access(NODE_DIR, fsp.constants.F_OK).catch(() => {
await access(NODE_DIR, constants.F_OK).catch(() => {
throw new Error(`node repo must be checked out to \`${NODE_DIR}\` to continue`)
})

Expand Down
2 changes: 1 addition & 1 deletion scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const main = async (opts) => {
await npm('run', 'test-all', '--ignore-scripts')
}

await npm('prune', '--omit-dev', '--no-save', '--no-audit', '--no-fund')
await npm('prune', '--omit=dev', '--no-save', '--no-audit', '--no-fund')
await git.dirty()

for (const p of publishes) {
Expand Down
10 changes: 5 additions & 5 deletions scripts/util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fsp = require('fs/promises')
const fsp = require('@npmcli/fs')
const { resolve, join, relative } = require('path')
const { formatWithOptions } = require('util')
const log = require('proc-log')
Expand Down Expand Up @@ -73,29 +73,29 @@ const spawn = async (cmd, ...allArgs) => {
log.info('suppressed error', err.message)
}

if (res?.stdout) {
if (res && res.stdout) {
res.stdout = res.stdout.toString().trim()
if (res.stdout) {
log.silly('stdout', res.stdout)
}
}

if (res?.stderr) {
if (res && res.stderr) {
res.stderr = res.stderr.toString().trim()
if (res.stderr) {
log.silly('stderr', res.stderr)
}
}

if (lines) {
return (res?.stdout || '')
return ((res && res.stdout) || '')
.split('\n')
.map(l => l.trim())
.filter(Boolean)
}

if (out) {
return res?.stdout || ''
return (res && res.stdout) || ''
}

return res
Expand Down
2 changes: 1 addition & 1 deletion test/lib/docs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const t = require('tap')
const { join, resolve, basename, extname, dirname } = require('path')
const fs = require('fs/promises')
const fs = require('fs').promises
const localeCompare = require('@isaacs/string-locale-compare')('en')
const docs = require('@npmcli/docs')

Expand Down

0 comments on commit a4e2b78

Please sign in to comment.