Skip to content

Commit

Permalink
deps: walk-up-path@4.0.0
Browse files Browse the repository at this point in the history
Fixed code to deal w/ new esm export
  • Loading branch information
wraithgar committed Dec 6, 2024
1 parent d463a6f commit c0bcc2a
Show file tree
Hide file tree
Showing 17 changed files with 147 additions and 128 deletions.
4 changes: 3 additions & 1 deletion node_modules/binary-extensions/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module.exports = require('./binary-extensions.json');
import binaryExtensions from './binary-extensions.json' with {type: 'json'};

export default binaryExtensions;
21 changes: 13 additions & 8 deletions node_modules/binary-extensions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "binary-extensions",
"version": "2.3.0",
"version": "3.0.0",
"description": "List of binary file extensions",
"license": "MIT",
"repository": "sindresorhus/binary-extensions",
Expand All @@ -10,18 +10,23 @@
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"sideEffects": false,
"engines": {
"node": ">=8"
"node": ">=18.20"
},
"scripts": {
"test": "xo && ava && tsd"
"//test": "xo && ava && tsd",
"test": "ava && tsd"
},
"files": [
"index.js",
"index.d.ts",
"binary-extensions.json",
"binary-extensions.json.d.ts"
"binary-extensions.json"
],
"keywords": [
"binary",
Expand All @@ -33,8 +38,8 @@
"array"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
"ava": "^6.1.2",
"tsd": "^0.31.0",
"xo": "^0.58.0"
}
}
2 changes: 1 addition & 1 deletion node_modules/walk-up-path/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The ISC License

Copyright (c) Isaac Z. Schlueter
Copyright (c) 2020-2023 Isaac Z. Schlueter

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Expand Down
File renamed without changes.
File renamed without changes.
75 changes: 37 additions & 38 deletions node_modules/walk-up-path/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
{
"name": "walk-up-path",
"version": "3.0.1",
"version": "4.0.0",
"files": [
"dist"
],
"main": "./dist/cjs/index.js",
"module": "./dist/mjs/index.js",
"types": "./dist/mjs/index.d.ts",
"exports": {
".": {
"require": {
"types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.js"
},
"import": {
"types": "./dist/mjs/index.d.ts",
"default": "./dist/mjs/index.js"
}
}
},
"description": "Given a path string, return a generator that walks up the path, emitting each dirname.",
"repository": {
"type": "git",
Expand All @@ -30,15 +15,16 @@
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh",
"prepare": "tshy",
"pretest": "npm run prepare",
"presnap": "npm run prepare",
"test": "c8 tap",
"snap": "c8 tap",
"format": "prettier --write . --loglevel warn",
"test": "tap",
"snap": "tap",
"format": "prettier --write . --log-level warn",
"typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
},
"prettier": {
"experimentalTernaries": true,
"semi": false,
"printWidth": 75,
"tabWidth": 2,
Expand All @@ -49,24 +35,37 @@
"arrowParens": "avoid",
"endOfLine": "lf"
},
"tap": {
"coverage": false,
"node-arg": [
"--no-warnings",
"--loader",
"ts-node/esm"
],
"ts": false
},
"devDependencies": {
"@types/node": "^18.15.5",
"@types/tap": "^15.0.8",
"c8": "^7.13.0",
"eslint-config-prettier": "^8.8.0",
"prettier": "^2.8.6",
"tap": "^16.3.4",
"ts-node": "^10.9.1",
"typedoc": "^0.23.28",
"typescript": "^5.0.2"
"@types/node": "^20.14.10",
"prettier": "^3.3.2",
"tap": "^20.0.3",
"tshy": "^3.0.0",
"typedoc": "^0.26.3"
},
"type": "module",
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"module": "./dist/esm/index.js",
"engines": {
"node": "20 || >=22"
}
}
54 changes: 42 additions & 12 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2164,6 +2164,13 @@
"node": "^18.17.0 || >=20.5.0"
}
},
"mock-registry/node_modules/walk-up-path": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz",
"integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==",
"dev": true,
"license": "ISC"
},
"node_modules/@actions/core": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
Expand Down Expand Up @@ -4462,6 +4469,13 @@
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/@npmcli/template-oss/node_modules/walk-up-path": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz",
"integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==",
"dev": true,
"license": "ISC"
},
"node_modules/@npmcli/template-oss/node_modules/which": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz",
Expand Down Expand Up @@ -5495,12 +5509,12 @@
}
},
"node_modules/binary-extensions": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-3.0.0.tgz",
"integrity": "sha512-X0RfwMgXPEesg6PCXzytQZt9Unh9gtc4SfeTNJvKifUL//Oegcc/Yf31z6hThNZ8dnD3Ir3wkHVN0eWrTvP5ww==",
"license": "MIT",
"engines": {
"node": ">=8"
"node": ">=18.20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
Expand Down Expand Up @@ -9325,6 +9339,19 @@
"node": ">=8"
}
},
"node_modules/is-binary-path/node_modules/binary-extensions": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-boolean-object": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
Expand Down Expand Up @@ -17966,10 +17993,13 @@
}
},
"node_modules/walk-up-path": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz",
"integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==",
"license": "ISC"
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-4.0.0.tgz",
"integrity": "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==",
"license": "ISC",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/web-namespaces": {
"version": "2.0.1",
Expand Down Expand Up @@ -18476,7 +18506,7 @@
"semver": "^7.3.7",
"ssri": "^12.0.0",
"treeverse": "^3.0.0",
"walk-up-path": "^3.0.1"
"walk-up-path": "^4.0.0"
},
"bin": {
"arborist": "bin/index.js"
Expand Down Expand Up @@ -18508,7 +18538,7 @@
"nopt": "^8.0.0",
"proc-log": "^5.0.0",
"semver": "^7.3.5",
"walk-up-path": "^3.0.1"
"walk-up-path": "^4.0.0"
},
"devDependencies": {
"@npmcli/eslint-config": "^5.0.1",
Expand Down Expand Up @@ -18543,7 +18573,7 @@
"dependencies": {
"@npmcli/arborist": "^9.0.0-pre.0",
"@npmcli/installed-package-contents": "^3.0.0",
"binary-extensions": "^2.3.0",
"binary-extensions": "^3.0.0",
"diff": "^5.1.0",
"minimatch": "^9.0.4",
"npm-package-arg": "^12.0.0",
Expand Down Expand Up @@ -18572,7 +18602,7 @@
"read": "^4.0.0",
"read-package-json-fast": "^4.0.0",
"semver": "^7.3.7",
"walk-up-path": "^3.0.1"
"walk-up-path": "^4.0.0"
},
"devDependencies": {
"@npmcli/eslint-config": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion workspaces/arborist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"semver": "^7.3.7",
"ssri": "^12.0.0",
"treeverse": "^3.0.0",
"walk-up-path": "^3.0.1"
"walk-up-path": "^4.0.0"
},
"devDependencies": {
"@npmcli/eslint-config": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion workspaces/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"nopt": "^8.0.0",
"proc-log": "^5.0.0",
"semver": "^7.3.5",
"walk-up-path": "^3.0.1"
"walk-up-path": "^4.0.0"
},
"engines": {
"node": "^20.17.0 || >=22.9.0"
Expand Down
4 changes: 2 additions & 2 deletions workspaces/libnpmdiff/lib/format-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const color = (colorStr, colorId) => {
return colorStr.replace(/[^\n\r]+/g, open + '$&' + close)
}

const formatDiff = ({ files, opts = {}, refs, versions }) => {
const formatDiff = async ({ files, opts = {}, refs, versions }) => {
let res = ''
const srcPrefix = opts.diffNoPrefix ? '' : opts.diffSrcPrefix || 'a/'
const dstPrefix = opts.diffNoPrefix ? '' : opts.diffDstPrefix || 'b/'
Expand Down Expand Up @@ -77,7 +77,7 @@ const formatDiff = ({ files, opts = {}, refs, versions }) => {
/* eslint-disable-next-line max-len */
header(`index ${opts.tagVersionPrefix || 'v'}${versions.a}..${opts.tagVersionPrefix || 'v'}${versions.b} ${fileMode}`)

if (shouldPrintPatch(filename)) {
if (await shouldPrintPatch(filename)) {
patch += jsDiff.createTwoFilesPatch(
names.a,
names.b,
Expand Down
6 changes: 3 additions & 3 deletions workspaces/libnpmdiff/lib/should-print-patch.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const { basename, extname } = require('node:path')

const binaryExtensions = require('binary-extensions')

// we should try to print patches as long as the
// extension is not identified as binary files
const shouldPrintPatch = (path, opts = {}) => {
const shouldPrintPatch = async (path, opts = {}) => {
if (opts.diffText) {
return true
}

const { default: binaryExtensions } = await import('binary-extensions')

const filename = basename(path)
const extension = (
filename.startsWith('.')
Expand Down
2 changes: 1 addition & 1 deletion workspaces/libnpmdiff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"dependencies": {
"@npmcli/arborist": "^9.0.0-pre.0",
"@npmcli/installed-package-contents": "^3.0.0",
"binary-extensions": "^2.3.0",
"binary-extensions": "^3.0.0",
"diff": "^5.1.0",
"minimatch": "^9.0.4",
"npm-package-arg": "^12.0.0",
Expand Down
Loading

0 comments on commit c0bcc2a

Please sign in to comment.