Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gar/deps updates #7058

Merged
merged 9 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ graph LR;
libnpmversion-->require-inject;
libnpmversion-->semver;
libnpmversion-->tap;
lru-cache-->semver;
lru-cache-->yallist;
make-fetch-happen-->cacache;
make-fetch-happen-->http-cache-semantics;
Expand Down
37 changes: 26 additions & 11 deletions docs/lib/content/configuring-npm/package-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,25 +291,40 @@ Certain files are always included, regardless of settings:

`README` & `LICENSE` can have any case and extension.

Conversely, some files are always ignored:
Some files are always ignored by default:

* `*.orig`
* `.*.swp`
* `.DS_Store`
* `._*`
* `.git`
* `CVS`
* `.svn`
* `.npmrc`
* `.hg`
* `.lock-wscript`
* `.npmrc`
* `.svn`
* `.wafpickle-N`
* `.*.swp`
* `.DS_Store`
* `._*`
* `CVS`
* `config.gypi`
* `node_modules`
* `npm-debug.log`
* `package-lock.json` (use
[`npm-shrinkwrap.json`](/configuring-npm/npm-shrinkwrap-json)
if you wish it to be published)
* `pnpm-lock.yaml`
* `yarn.lock`

Most of these ignored files can be included specifically if included in
the `files` globs. Exceptions to this are:

* `.git`
* `.npmrc`
* `node_modules`
* `config.gypi`
* `*.orig`
* `package-lock.json` (use
[`npm-shrinkwrap.json`](/configuring-npm/npm-shrinkwrap-json) if you wish
it to be published)
* `package-lock.json`
* `pnpm-lock.yaml`
* `yarn.lock`

These can not be included.

### main

Expand Down
3 changes: 0 additions & 3 deletions node_modules/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@
!/make-fetch-happen
!/minimatch
!/minipass-collect
!/minipass-collect/node_modules/
/minipass-collect/node_modules/*
!/minipass-collect/node_modules/minipass
!/minipass-fetch
!/minipass-flush
!/minipass-flush/node_modules/
Expand Down
1 change: 1 addition & 0 deletions node_modules/cacache/lib/content/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class CacacheWriteStream extends Flush {
this.cache,
this.opts
)
this.handleContentP.catch(error => this.emit('error', error))
}
return this.inputStream.write(chunk, encoding, cb)
}
Expand Down
16 changes: 5 additions & 11 deletions node_modules/cacache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cacache",
"version": "18.0.0",
"version": "18.0.1",
"cache-version": {
"content": "2",
"index": "5"
Expand Down Expand Up @@ -50,7 +50,7 @@
"glob": "^10.2.2",
"lru-cache": "^10.0.1",
"minipass": "^7.0.3",
"minipass-collect": "^1.0.2",
"minipass-collect": "^2.0.1",
"minipass-flush": "^1.0.5",
"minipass-pipeline": "^1.2.4",
"p-map": "^4.0.0",
Expand All @@ -60,7 +60,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.18.0",
"@npmcli/template-oss": "4.19.0",
"tap": "^16.0.0"
},
"engines": {
Expand All @@ -69,14 +69,8 @@
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
"version": "4.18.0",
"publish": "true",
"ciVersions": [
"16.14.0",
"16.x",
"18.0.0",
"18.x"
]
"version": "4.19.0",
"publish": "true"
},
"author": "GitHub Inc.",
"tap": {
Expand Down
34 changes: 25 additions & 9 deletions node_modules/ignore-walk/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Walker extends EE {
this.result = this.parent ? this.parent.result : new Set()
this.entries = null
this.sawError = false
this.exact = opts.exact
}

sort (a, b) {
Expand Down Expand Up @@ -164,7 +165,7 @@ class Walker extends EE {
} else {
// is a directory
if (dir) {
this.walker(entry, { isSymbolicLink }, then)
this.walker(entry, { isSymbolicLink, exact: file || this.filterEntry(entry + '/') }, then)
} else {
then()
}
Expand Down Expand Up @@ -208,15 +209,19 @@ class Walker extends EE {
new Walker(this.walkerOpt(entry, opts)).on('done', then).start()
}

filterEntry (entry, partial) {
filterEntry (entry, partial, entryBasename) {
let included = true

// this = /a/b/c
// entry = d
// parent /a/b sees c/d
if (this.parent && this.parent.filterEntry) {
var pt = this.basename + '/' + entry
included = this.parent.filterEntry(pt, partial)
const parentEntry = this.basename + '/' + entry
const parentBasename = entryBasename || entry
included = this.parent.filterEntry(parentEntry, partial, parentBasename)
if (!included && !this.exact) {
return false
}
}

this.ignoreFiles.forEach(f => {
Expand All @@ -226,17 +231,28 @@ class Walker extends EE {
// so if it's negated, and already included, no need to check
// likewise if it's neither negated nor included
if (rule.negate !== included) {
const isRelativeRule = entryBasename && rule.globParts.some(part =>
part.length <= (part.slice(-1)[0] ? 1 : 2)
)

// first, match against /foo/bar
// then, against foo/bar
// then, in the case of partials, match with a /
// then, if also the rule is relative, match against basename
const match = rule.match('/' + entry) ||
rule.match(entry) ||
(!!partial && (
!!partial && (
rule.match('/' + entry + '/') ||
rule.match(entry + '/'))) ||
(!!partial && rule.negate && (
rule.match('/' + entry, true) ||
rule.match(entry, true)))
rule.match(entry + '/') ||
rule.negate && (
rule.match('/' + entry, true) ||
rule.match(entry, true)) ||
isRelativeRule && (
rule.match('/' + entryBasename + '/') ||
rule.match(entryBasename + '/') ||
rule.negate && (
rule.match('/' + entryBasename, true) ||
rule.match(entryBasename, true))))

if (match) {
included = rule.negate
Expand Down
6 changes: 3 additions & 3 deletions node_modules/ignore-walk/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "ignore-walk",
"version": "6.0.3",
"version": "6.0.4",
"description": "Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.",
"main": "lib/index.js",
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.14.1",
"@npmcli/template-oss": "4.19.0",
"mutate-fs": "^2.1.1",
"tap": "^16.0.1"
},
Expand Down Expand Up @@ -56,7 +56,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.14.1",
"version": "4.19.0",
"content": "scripts/template-oss",
"publish": "true"
}
Expand Down
Loading