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

[pull] main from browserify:main #13

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4441c5f
[actions] use reusable rebase action
ljharb Sep 15, 2023
343ea44
[Fix] allow `npx resolve` to work (#316)
ljharb Sep 15, 2023
2ae67c1
v1.22.6
ljharb Sep 15, 2023
a9c252e
Merge tag 'v1.22.6'
ljharb Sep 15, 2023
39ed3c4
[Tests] avoid publishing "malformed package.json" test to avoid flawe…
ljharb Sep 28, 2023
b675255
[Dev Deps] update `tape`
ljharb Sep 28, 2023
9e6f936
[Tests] avoid publishing "malformed package.json" test to avoid flawe…
ljharb Sep 28, 2023
8d58ef9
[Dev Deps] update `tape`
ljharb Sep 28, 2023
75d3bb9
v1.22.7
ljharb Oct 10, 2023
f0930c0
[Tests] skip some tests for a broken `require.resolve` in node v8.9, …
ljharb May 5, 2023
bce4768
[Tests] rename innocent test project to avoid flawed security scanners
ljharb Oct 10, 2023
c24f451
[Tests] rename innocent test project to avoid flawed security scanners
ljharb Oct 10, 2023
b829872
v1.22.8
ljharb Oct 10, 2023
d8101cd
Merge tag 'v1.22.7'
ljharb Oct 10, 2023
6e2b5e2
Merge tag 'v1.22.8'
ljharb Oct 10, 2023
06fe600
[meta] restore v2 version number
ljharb Oct 10, 2023
284daba
v2.0.0-next.5
ljharb Oct 10, 2023
ebc0a9d
[Dev Deps] update `tape`
ljharb Nov 6, 2023
373a9d1
[Deps] update `is-core-module`
ljharb Nov 6, 2023
eea4908
[meta] explicitly declare `engines.node`
ljharb Nov 6, 2023
4830ec0
[Dev Deps] update `aud`, `npmignore`
ljharb Dec 12, 2023
40d16e3
[Tests] fix linting
ljharb Dec 29, 2023
b822ea6
[Dev Deps] update `mkdirp`
ljharb Jan 4, 2024
148afc4
[Dev Deps] update `array.prototype.map`, `tape`
ljharb Mar 24, 2024
fd788d9
[actions] remove redundant finisher
ljharb Mar 24, 2024
ba45361
[meta] add funding-manifest-urls
ljharb Dec 5, 2024
e6d3f7e
[Tests] replace `aud` with `npm audit`
ljharb Dec 5, 2024
3d720b9
[Dev Deps] update `@ljharb/eslint-config`, `tape`
ljharb Dec 5, 2024
ae428ee
[Deps] update `is-core-module`
ljharb Dec 5, 2024
0739c90
[meta] update funding-manifest-urls
ljharb Dec 5, 2024
f5df38d
[Tests] account for `vlt i`
ljharb Dec 5, 2024
dd8ac52
[Tests] replace `aud` with `npm audit`
ljharb Dec 13, 2024
82bd58d
[actions] split out node 10-20, and 20+
ljharb Dec 13, 2024
fae22b9
[Dev Deps] update `@ljharb/eslint-config`, `array.prototype.map`, `np…
ljharb Dec 13, 2024
0ef42ee
[Deps] update `is-core-module`
ljharb Dec 13, 2024
a7c3075
v1.22.9
ljharb Dec 13, 2024
4cd9ba0
Merge tag 'v1.22.9' into HEAD
ljharb Dec 13, 2024
5c5fe56
[actions] re-add finishers
ljharb Dec 13, 2024
5bd9dbf
[meta] sort package.json
ljharb Dec 13, 2024
d08a96f
[meta] add missing `engines.node`
ljharb Dec 13, 2024
fa2d718
[meta] ensure list-export fixtures are not published
ljharb Dec 19, 2024
d1e7327
v1.22.10
ljharb Dec 19, 2024
cf4ee88
Merge tag 'v1.22.10' into HEAD
ljharb Dec 19, 2024
32b51a5
[Tests] fix posttest script on Windows
targos Dec 29, 2024
9af2ee6
[Dev Deps] update `array.prototype.map`
ljharb Dec 30, 2024
b24dbdc
[Deps] update `is-core-module`
ljharb Dec 30, 2024
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
9 changes: 5 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

"extends": "@ljharb",

"ignorePatterns": [
"test/resolver/malformed_package_json/package.json",
"test/list-exports/**",
],

"rules": {
"indent": [2, 4],
"strict": 0,
Expand Down Expand Up @@ -58,8 +63,4 @@
},
},
],

"ignorePatterns": [
"./test/resolver/malformed_package_json/package.json",
],
}
4 changes: 4 additions & 0 deletions .github/.well-known/funding-manifest-urls
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
https://github.com/ljharb/.github/blob/HEAD/funding.json
https://github.com/ljharb/.github/blob/main/funding.json
https://github.com/browserify/resolve
https://github.com/sponsors/ljharb
2 changes: 1 addition & 1 deletion .github/workflows/node-aught.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
- run: true
11 changes: 7 additions & 4 deletions .github/workflows/node-tens.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
name: 'Tests: node.js >= 10'
name: 'Tests: node.js 10 - 20'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 10'
range: '>= 10 < 20'
type: minors
command: npm run tests-only

node:
name: 'node >= 10'
name: 'node 10 - 20'
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
- run: true
21 changes: 21 additions & 0 deletions .github/workflows/node-twenties.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Tests: node.js >= 20'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 20'
type: minors
command: npm run tests-only

node:
name: 'node >= 20'
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: true
51 changes: 28 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "resolve",
"description": "resolve like require.resolve() on behalf of files asynchronously and synchronously",
"version": "2.0.0-next.4",
"version": "2.0.0-next.5",
"repository": {
"type": "git",
"url": "git://github.com/browserify/resolve.git"
Expand Down Expand Up @@ -32,33 +32,15 @@
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"prelint": "eclint check $(git ls-files | grep -Ev test/list-exports$ | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs --no-eslintrc -c .eslintrc . 'bin/**'",
"pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async",
"tests-only": "tape test/*.js",
"pretest": "npm run lint",
"test": "npm run --silent tests-only",
"posttest": "npm run test:multirepo && aud --production",
"posttest": "npm run test:multirepo && npx npm@\">= 10.2\" audit --production",
"test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.0",
"array.prototype.map": "^1.0.6",
"aud": "^2.0.3",
"copy-dir": "^1.3.0",
"eclint": "^2.8.1",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"mkdirp": "^0.5.5",
"mv": "^2.1.1",
"npmignore": "^0.3.0",
"object-keys": "^1.1.1",
"rimraf": "^2.7.1",
"safe-publish-latest": "^2.0.0",
"tap": "^0.4.13",
"tape": "^5.6.6",
"tmp": "^0.0.31"
},
"license": "MIT",
"author": {
"name": "James Halliday",
Expand All @@ -69,14 +51,37 @@
"url": "https://github.com/sponsors/ljharb"
},
"dependencies": {
"is-core-module": "^2.13.0",
"is-core-module": "^2.16.1",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.1",
"array.prototype.map": "^1.0.8",
"copy-dir": "^1.3.0",
"eclint": "^2.8.1",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"mkdirp": "^0.5.6",
"mv": "^2.1.1",
"npmignore": "^0.3.1",
"object-keys": "^1.1.1",
"rimraf": "^2.7.1",
"safe-publish-latest": "^2.0.0",
"tap": "^0.4.13",
"tape": "^5.9.0",
"tmp": "^0.0.31"
},
"publishConfig": {
"ignore": [
".github/workflows",
"appveyor.yml"
".github/.well-known",
"appveyor.yml",
"test/resolver/malformed_package_json",
"test/list-exports"
]
},
"engines": {
"node": ">= 0.4"
}
}
2 changes: 1 addition & 1 deletion test/node_path.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ test('$NODE_PATH', function (t) {
}, function (err, res) {
var root = require('tap/package.json').main; // eslint-disable-line global-require
t.error(err);
t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves');
t.equal(res.replace('/node_modules/.vlt/··tap@0.4.13/', '/'), path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves');
});
});
6 changes: 4 additions & 2 deletions test/resolver.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var path = require('path');
var fs = require('fs');
var test = require('tape');
var resolve = require('../');
var async = require('../async');
Expand Down Expand Up @@ -555,14 +556,15 @@ test('absolute paths', function (t) {
});
});

test('malformed package.json', function (t) {
var malformedDir = path.join(__dirname, 'resolver/malformed_package_json');
test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) {
/* eslint operator-linebreak: ["error", "before"], function-paren-newline: "off" */
t.plan(
(3 * 3) // 3 sets of 3 assertions in the final callback
+ 2 // 1 readPackage call with malformed package.json
);

var basedir = path.join(__dirname, 'resolver/malformed_package_json');
var basedir = malformedDir;
var expected = path.join(basedir, 'index.js');

resolve('./index.js', { basedir: basedir }, function (err, res, pkg) {
Expand Down
2 changes: 1 addition & 1 deletion test/resolver/multirepo/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "monorepo-symlink-test",
"name": "ljharb-monorepo-symlink-test",
"private": true,
"version": "0.0.0",
"description": "",
Expand Down
5 changes: 3 additions & 2 deletions test/resolver_sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,11 @@ test('absolute paths', function (t) {
t.end();
});

test('malformed package.json', function (t) {
var malformedDir = path.join(__dirname, 'resolver/malformed_package_json');
test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) {
t.plan(5 + (requireResolveSupportsPaths ? 1 : 0));

var basedir = path.join(__dirname, 'resolver/malformed_package_json');
var basedir = malformedDir;
var expected = path.join(basedir, 'index.js');

t.equal(
Expand Down
Loading