projen 0.50.2 → 0.50.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/.jsii +157 -104
  2. package/API.md +48 -17
  3. package/changelog.md +1 -6
  4. package/lib/awscdk/auto-discover.js +1 -1
  5. package/lib/awscdk/awscdk-app-java.js +1 -1
  6. package/lib/awscdk/awscdk-app-ts.js +1 -1
  7. package/lib/awscdk/awscdk-construct.js +2 -2
  8. package/lib/awscdk/awscdk-deps-java.js +1 -1
  9. package/lib/awscdk/awscdk-deps-js.js +1 -1
  10. package/lib/awscdk/awscdk-deps.js +1 -1
  11. package/lib/awscdk/cdk-config.js +1 -1
  12. package/lib/awscdk/cdk-tasks.js +1 -1
  13. package/lib/awscdk/integration-test.js +1 -1
  14. package/lib/awscdk/lambda-function.js +2 -2
  15. package/lib/build/build-workflow.js +1 -1
  16. package/lib/cdk/construct-lib.js +1 -1
  17. package/lib/cdk/jsii-docgen.js +1 -1
  18. package/lib/cdk/jsii-project.js +1 -1
  19. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  20. package/lib/cdk8s/cdk8s-construct.js +1 -1
  21. package/lib/cdktf/cdktf-construct.js +1 -1
  22. package/lib/component.js +1 -1
  23. package/lib/dependencies.js +1 -1
  24. package/lib/dev-env.js +1 -1
  25. package/lib/docker-compose.js +2 -2
  26. package/lib/file.js +1 -1
  27. package/lib/gitattributes.js +1 -1
  28. package/lib/github/auto-approve.js +1 -1
  29. package/lib/github/auto-merge.js +1 -1
  30. package/lib/github/dependabot.js +1 -1
  31. package/lib/github/github-project.js +1 -1
  32. package/lib/github/github.js +1 -1
  33. package/lib/github/mergify.js +1 -1
  34. package/lib/github/pr-template.js +1 -1
  35. package/lib/github/pull-request-lint.js +1 -1
  36. package/lib/github/stale.js +1 -1
  37. package/lib/github/task-workflow.js +1 -1
  38. package/lib/github/workflows.js +1 -1
  39. package/lib/gitlab/configuration.js +1 -1
  40. package/lib/gitlab/gitlab-configuration.js +1 -1
  41. package/lib/gitlab/nested-configuration.d.ts +0 -7
  42. package/lib/gitlab/nested-configuration.js +2 -16
  43. package/lib/gitpod.js +1 -1
  44. package/lib/ignore-file.js +1 -1
  45. package/lib/ini.js +1 -1
  46. package/lib/java/java-project.js +1 -1
  47. package/lib/java/junit.js +1 -1
  48. package/lib/java/maven-compile.js +1 -1
  49. package/lib/java/maven-packaging.js +1 -1
  50. package/lib/java/maven-sample.js +1 -1
  51. package/lib/java/pom.js +1 -1
  52. package/lib/java/projenrc.js +1 -1
  53. package/lib/javascript/bundler.js +1 -1
  54. package/lib/javascript/eslint.js +1 -1
  55. package/lib/javascript/jest.js +1 -1
  56. package/lib/javascript/node-package.js +1 -1
  57. package/lib/javascript/node-project.d.ts +19 -1
  58. package/lib/javascript/node-project.js +14 -6
  59. package/lib/javascript/npm-config.js +1 -1
  60. package/lib/javascript/prettier.d.ts +6 -0
  61. package/lib/javascript/prettier.js +15 -2
  62. package/lib/javascript/projenrc.js +1 -1
  63. package/lib/javascript/typescript-config.js +1 -1
  64. package/lib/javascript/upgrade-dependencies.js +4 -4
  65. package/lib/json.js +1 -1
  66. package/lib/license.js +1 -1
  67. package/lib/logger.js +1 -1
  68. package/lib/makefile.js +1 -1
  69. package/lib/object-file.js +1 -1
  70. package/lib/project-build.js +1 -1
  71. package/lib/project.js +1 -1
  72. package/lib/projects.js +1 -1
  73. package/lib/projenrc-json.js +1 -1
  74. package/lib/python/pip.js +1 -1
  75. package/lib/python/poetry.js +2 -2
  76. package/lib/python/projenrc.js +1 -1
  77. package/lib/python/pytest.js +1 -1
  78. package/lib/python/python-project.js +1 -1
  79. package/lib/python/python-sample.js +1 -1
  80. package/lib/python/requirements-file.js +1 -1
  81. package/lib/python/setuppy.js +1 -1
  82. package/lib/python/setuptools.js +1 -1
  83. package/lib/python/venv.js +1 -1
  84. package/lib/readme.js +1 -1
  85. package/lib/release/publisher.js +1 -1
  86. package/lib/release/release-trigger.js +1 -1
  87. package/lib/release/release.js +1 -1
  88. package/lib/sample-file.js +2 -2
  89. package/lib/semver.js +1 -1
  90. package/lib/source-code.d.ts +1 -0
  91. package/lib/source-code.js +3 -2
  92. package/lib/task-runtime.js +1 -1
  93. package/lib/task.js +1 -1
  94. package/lib/tasks.js +1 -1
  95. package/lib/testing.js +1 -1
  96. package/lib/textfile.js +1 -1
  97. package/lib/toml.js +1 -1
  98. package/lib/typescript/projenrc.js +1 -1
  99. package/lib/typescript/typescript-typedoc.js +1 -1
  100. package/lib/typescript/typescript.js +3 -3
  101. package/lib/version.js +1 -1
  102. package/lib/vscode/devcontainer.js +1 -1
  103. package/lib/vscode/launch-config.js +1 -1
  104. package/lib/vscode/vscode.js +1 -1
  105. package/lib/web/next.js +3 -3
  106. package/lib/web/postcss.js +1 -1
  107. package/lib/web/react.js +4 -4
  108. package/lib/web/tailwind.js +1 -1
  109. package/lib/xmlfile.js +1 -1
  110. package/lib/yaml.js +1 -1
  111. package/node_modules/resolve/.eslintrc +33 -8
  112. package/node_modules/resolve/.github/FUNDING.yml +12 -0
  113. package/node_modules/resolve/appveyor.yml +4 -2
  114. package/node_modules/resolve/async.js +3 -0
  115. package/node_modules/resolve/bin/resolve +47 -0
  116. package/node_modules/resolve/lib/core.js +1 -2
  117. package/node_modules/resolve/lib/core.json +81 -12
  118. package/node_modules/resolve/lib/node-modules-paths.js +1 -1
  119. package/node_modules/resolve/lib/sync.js +4 -4
  120. package/node_modules/resolve/package.json +18 -12
  121. package/node_modules/resolve/readme.markdown +35 -13
  122. package/node_modules/resolve/sync.js +3 -0
  123. package/node_modules/resolve/test/mock_sync.js +2 -4
  124. package/node_modules/resolve/test/node_path.js +1 -1
  125. package/node_modules/resolve/test/resolver/invalid_main/package.json +1 -1
  126. package/node_modules/resolve/test/resolver/malformed_package_json/index.js +0 -0
  127. package/node_modules/resolve/test/resolver/malformed_package_json/package.json +1 -0
  128. package/node_modules/resolve/test/resolver.js +99 -3
  129. package/node_modules/resolve/test/resolver_sync.js +88 -3
  130. package/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
  131. package/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
  132. package/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
  133. package/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
  134. package/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
  135. package/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
  136. package/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
  137. package/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
  138. package/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
  139. package/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
  140. package/node_modules/xmlbuilder2/node_modules/@types/node/README.md +1 -1
  141. package/node_modules/xmlbuilder2/node_modules/@types/node/net.d.ts +1 -0
  142. package/node_modules/xmlbuilder2/node_modules/@types/node/package.json +2 -2
  143. package/node_modules/xmlbuilder2/node_modules/@types/node/process.d.ts +1 -1
  144. package/package.json +3 -3
  145. package/releasetag.txt +1 -1
  146. package/version.txt +1 -1
  147. package/node_modules/resolve/.eslintignore +0 -1
  148. package/node_modules/resolve/test/.eslintrc +0 -5
package/lib/yaml.js CHANGED
@@ -36,5 +36,5 @@ class YamlFile extends object_file_1.ObjectFile {
36
36
  }
37
37
  exports.YamlFile = YamlFile;
38
38
  _a = JSII_RTTI_SYMBOL_1;
39
- YamlFile[_a] = { fqn: "projen.YamlFile", version: "0.50.2" };
39
+ YamlFile[_a] = { fqn: "projen.YamlFile", version: "0.50.7" };
40
40
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieWFtbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy95YW1sLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsNkJBQTZCO0FBRTdCLCtDQUE4RDs7Ozs7O0FBTzlELE1BQWEsUUFBUyxTQUFRLHdCQUFVOzs7O0lBQ3RDLFlBQVksT0FBZ0IsRUFBRSxRQUFnQixFQUFFLE9BQXdCO1FBQ3RFLEtBQUssQ0FBQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQ3BDLENBQUM7Ozs7OztJQUVTLGlCQUFpQixDQUFDLFFBQW1CO1FBQzdDLE1BQU0sSUFBSSxHQUFHLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUMvQyxJQUFJLENBQUMsSUFBSSxFQUFFO1lBQ1QsT0FBTyxTQUFTLENBQUM7U0FDbEI7UUFFRCxPQUFPO1lBQ0wsR0FBRyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxRQUFRLENBQUMsYUFBYSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDO1lBQ3ZELEVBQUU7WUFDRixJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLEVBQUUsRUFBRSxNQUFNLEVBQUUsQ0FBQyxFQUFFLENBQUM7U0FDaEQsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDZixDQUFDOztBQWhCSCw0QkFpQkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBZQU1MIGZyb20gXCJ5YW1sXCI7XG5pbXBvcnQgeyBJUmVzb2x2ZXIgfSBmcm9tIFwiLi9maWxlXCI7XG5pbXBvcnQgeyBPYmplY3RGaWxlLCBPYmplY3RGaWxlT3B0aW9ucyB9IGZyb20gXCIuL29iamVjdC1maWxlXCI7XG5pbXBvcnQgeyBQcm9qZWN0IH0gZnJvbSBcIi4vcHJvamVjdFwiO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5leHBvcnQgaW50ZXJmYWNlIFlhbWxGaWxlT3B0aW9ucyBleHRlbmRzIE9iamVjdEZpbGVPcHRpb25zIHt9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmV4cG9ydCBjbGFzcyBZYW1sRmlsZSBleHRlbmRzIE9iamVjdEZpbGUge1xuICBjb25zdHJ1Y3Rvcihwcm9qZWN0OiBQcm9qZWN0LCBmaWxlUGF0aDogc3RyaW5nLCBvcHRpb25zOiBZYW1sRmlsZU9wdGlvbnMpIHtcbiAgICBzdXBlcihwcm9qZWN0LCBmaWxlUGF0aCwgb3B0aW9ucyk7XG4gIH1cblxuICBwcm90ZWN0ZWQgc3ludGhlc2l6ZUNvbnRlbnQocmVzb2x2ZXI6IElSZXNvbHZlcik6IHN0cmluZyB8IHVuZGVmaW5lZCB7XG4gICAgY29uc3QganNvbiA9IHN1cGVyLnN5bnRoZXNpemVDb250ZW50KHJlc29sdmVyKTtcbiAgICBpZiAoIWpzb24pIHtcbiAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIFtcbiAgICAgIC4uLih0aGlzLm1hcmtlciA/IFtgIyAke1lhbWxGaWxlLlBST0pFTl9NQVJLRVJ9YF0gOiBbXSksXG4gICAgICBcIlwiLFxuICAgICAgWUFNTC5zdHJpbmdpZnkoSlNPTi5wYXJzZShqc29uKSwgeyBpbmRlbnQ6IDIgfSksXG4gICAgXS5qb2luKFwiXFxuXCIpO1xuICB9XG59XG4iXX0=
@@ -1,9 +1,9 @@
1
1
  {
2
- "extends": "@ljharb",
3
2
  "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
4
6
  "rules": {
5
- "array-bracket-newline": 0,
6
- "array-element-newline": 0,
7
7
  "indent": [2, 4],
8
8
  "strict": 0,
9
9
  "complexity": 0,
@@ -12,7 +12,7 @@
12
12
  "dot-notation": [2, { "allowKeywords": true }],
13
13
  "func-name-matching": 0,
14
14
  "func-style": 0,
15
- "global-require": 0,
15
+ "global-require": 1,
16
16
  "id-length": [2, { "min": 1, "max": 30 }],
17
17
  "max-lines-per-function": 0,
18
18
  "max-nested-callbacks": 0,
@@ -20,20 +20,45 @@
20
20
  "max-statements-per-line": [2, { "max": 2 }],
21
21
  "max-statements": 0,
22
22
  "no-magic-numbers": 0,
23
- "no-console": 0,
24
23
  "no-shadow": 0,
25
- "no-unused-vars": [2, { "vars": "all", "args": "none" }],
26
24
  "no-use-before-define": 0,
27
- "object-curly-newline": 0,
28
- "operator-linebreak": [2, "before"],
29
25
  "sort-keys": 0,
30
26
  },
31
27
  "overrides": [
28
+ {
29
+ "files": "bin/**",
30
+ "rules": {
31
+ "no-process-exit": "off",
32
+ },
33
+ },
34
+ {
35
+ "files": "example/**",
36
+ "rules": {
37
+ "no-console": 0,
38
+ },
39
+ },
32
40
  {
33
41
  "files": "test/resolver/nested_symlinks/mylib/*.js",
34
42
  "rules": {
35
43
  "no-throw-literal": 0,
36
44
  },
37
45
  },
46
+ {
47
+ "files": "test/**",
48
+ "parserOptions": {
49
+ "ecmaVersion": 5,
50
+ "allowReserved": false,
51
+ },
52
+ "rules": {
53
+ "dot-notation": [2, { "allowPattern": "throws" }],
54
+ "max-lines": 0,
55
+ "max-lines-per-function": 0,
56
+ "no-unused-vars": [2, { "vars": "all", "args": "none" }],
57
+ },
58
+ },
59
+ ],
60
+
61
+ "ignorePatterns": [
62
+ "./test/resolver/malformed_package_json/package.json",
38
63
  ],
39
64
  }
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [ljharb]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: npm/resolve
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -4,7 +4,9 @@ build: off
4
4
 
5
5
  environment:
6
6
  matrix:
7
- #- nodejs_version: "15"
7
+ #- nodejs_version: "17"
8
+ - nodejs_version: "16"
9
+ - nodejs_version: "15"
8
10
  - nodejs_version: "14"
9
11
  - nodejs_version: "13"
10
12
  - nodejs_version: "12"
@@ -26,7 +28,6 @@ environment:
26
28
  matrix:
27
29
  # fast_finish: true
28
30
  allow_failures:
29
- - nodejs_version: "5" # due to windows npm bug, registry-side
30
31
  - nodejs_version: "0.8"
31
32
  # platform: x86 # x64 has started failing on the registry side, around early November 2020
32
33
  - nodejs_version: "0.6"
@@ -60,6 +61,7 @@ install:
60
61
  - IF %nodejs_version% EQU 13 npm -g install npm@7
61
62
  - IF %nodejs_version% EQU 14 npm -g install npm@7
62
63
  - IF %nodejs_version% EQU 15 npm -g install npm@7
64
+ - IF %nodejs_version% EQU 16 npm -g install npm@7
63
65
  - set PATH=%APPDATA%\npm;%PATH%
64
66
  #- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm
65
67
  # install modules
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./lib/async');
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+
3
+ 'use strict';
4
+
5
+ var path = require('path');
6
+ var fs = require('fs');
7
+
8
+ if (
9
+ !process.argv
10
+ || process.argv.length < 2
11
+ || (process.argv[1] !== __filename && fs.statSync(process.argv[1]).ino !== fs.statSync(__filename).ino)
12
+ || (process.env._ && path.resolve(process.env._) !== __filename)
13
+ ) {
14
+ console.error('Error: `resolve` must be run directly as an executable');
15
+ process.exit(1);
16
+ }
17
+
18
+ var supportsPreserveSymlinkFlag = require('supports-preserve-symlinks-flag');
19
+
20
+ var preserveSymlinks = false;
21
+ for (var i = 2; i < process.argv.length; i += 1) {
22
+ if (process.argv[i].slice(0, 2) === '--') {
23
+ if (supportsPreserveSymlinkFlag && process.argv[i] === '--preserve-symlinks') {
24
+ preserveSymlinks = true;
25
+ } else if (process.argv[i].length > 2) {
26
+ console.error('Unknown argument ' + process.argv[i].replace(/[=].*$/, ''));
27
+ process.exit(2);
28
+ }
29
+ process.argv.splice(i, 1);
30
+ i -= 1;
31
+ if (process.argv[i] === '--') { break; } // eslint-disable-line no-restricted-syntax
32
+ }
33
+ }
34
+
35
+ if (process.argv.length < 3) {
36
+ console.error('Error: `resolve` expects a specifier');
37
+ process.exit(2);
38
+ }
39
+
40
+ var resolve = require('../');
41
+
42
+ var result = resolve.sync(process.argv[2], {
43
+ basedir: process.cwd(),
44
+ preserveSymlinks: preserveSymlinks
45
+ });
46
+
47
+ console.log(result);
@@ -15,9 +15,8 @@ function specifierIncluded(specifier) {
15
15
  return cur < ver;
16
16
  } else if (op === '>=') {
17
17
  return cur >= ver;
18
- } else {
19
- return false;
20
18
  }
19
+ return false;
21
20
  }
22
21
  return op === '>=';
23
22
  }
@@ -1,83 +1,152 @@
1
1
  {
2
2
  "assert": true,
3
+ "node:assert": [">= 14.18 && < 15", ">= 16"],
3
4
  "assert/strict": ">= 15",
5
+ "node:assert/strict": ">= 16",
4
6
  "async_hooks": ">= 8",
7
+ "node:async_hooks": [">= 14.18 && < 15", ">= 16"],
5
8
  "buffer_ieee754": "< 0.9.7",
6
9
  "buffer": true,
10
+ "node:buffer": [">= 14.18 && < 15", ">= 16"],
7
11
  "child_process": true,
12
+ "node:child_process": [">= 14.18 && < 15", ">= 16"],
8
13
  "cluster": true,
14
+ "node:cluster": [">= 14.18 && < 15", ">= 16"],
9
15
  "console": true,
16
+ "node:console": [">= 14.18 && < 15", ">= 16"],
10
17
  "constants": true,
18
+ "node:constants": [">= 14.18 && < 15", ">= 16"],
11
19
  "crypto": true,
20
+ "node:crypto": [">= 14.18 && < 15", ">= 16"],
12
21
  "_debug_agent": ">= 1 && < 8",
13
22
  "_debugger": "< 8",
14
23
  "dgram": true,
15
- "diagnostics_channel": ">= 15.1",
24
+ "node:dgram": [">= 14.18 && < 15", ">= 16"],
25
+ "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"],
26
+ "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
16
27
  "dns": true,
28
+ "node:dns": [">= 14.18 && < 15", ">= 16"],
17
29
  "dns/promises": ">= 15",
30
+ "node:dns/promises": ">= 16",
18
31
  "domain": ">= 0.7.12",
32
+ "node:domain": [">= 14.18 && < 15", ">= 16"],
19
33
  "events": true,
34
+ "node:events": [">= 14.18 && < 15", ">= 16"],
20
35
  "freelist": "< 6",
21
36
  "fs": true,
37
+ "node:fs": [">= 14.18 && < 15", ">= 16"],
22
38
  "fs/promises": [">= 10 && < 10.1", ">= 14"],
39
+ "node:fs/promises": [">= 14.18 && < 15", ">= 16"],
23
40
  "_http_agent": ">= 0.11.1",
41
+ "node:_http_agent": [">= 14.18 && < 15", ">= 16"],
24
42
  "_http_client": ">= 0.11.1",
43
+ "node:_http_client": [">= 14.18 && < 15", ">= 16"],
25
44
  "_http_common": ">= 0.11.1",
45
+ "node:_http_common": [">= 14.18 && < 15", ">= 16"],
26
46
  "_http_incoming": ">= 0.11.1",
47
+ "node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
27
48
  "_http_outgoing": ">= 0.11.1",
49
+ "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
28
50
  "_http_server": ">= 0.11.1",
51
+ "node:_http_server": [">= 14.18 && < 15", ">= 16"],
29
52
  "http": true,
53
+ "node:http": [">= 14.18 && < 15", ">= 16"],
30
54
  "http2": ">= 8.8",
55
+ "node:http2": [">= 14.18 && < 15", ">= 16"],
31
56
  "https": true,
32
- "inspector": ">= 8.0.0",
57
+ "node:https": [">= 14.18 && < 15", ">= 16"],
58
+ "inspector": ">= 8",
59
+ "node:inspector": [">= 14.18 && < 15", ">= 16"],
33
60
  "_linklist": "< 8",
34
61
  "module": true,
62
+ "node:module": [">= 14.18 && < 15", ">= 16"],
35
63
  "net": true,
36
- "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
37
- "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
38
- "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
64
+ "node:net": [">= 14.18 && < 15", ">= 16"],
65
+ "node-inspect/lib/_inspect": ">= 7.6 && < 12",
66
+ "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
67
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
39
68
  "os": true,
69
+ "node:os": [">= 14.18 && < 15", ">= 16"],
40
70
  "path": true,
71
+ "node:path": [">= 14.18 && < 15", ">= 16"],
41
72
  "path/posix": ">= 15.3",
73
+ "node:path/posix": ">= 16",
42
74
  "path/win32": ">= 15.3",
75
+ "node:path/win32": ">= 16",
43
76
  "perf_hooks": ">= 8.5",
77
+ "node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
44
78
  "process": ">= 1",
79
+ "node:process": [">= 14.18 && < 15", ">= 16"],
45
80
  "punycode": true,
81
+ "node:punycode": [">= 14.18 && < 15", ">= 16"],
46
82
  "querystring": true,
83
+ "node:querystring": [">= 14.18 && < 15", ">= 16"],
47
84
  "readline": true,
85
+ "node:readline": [">= 14.18 && < 15", ">= 16"],
86
+ "readline/promises": ">= 17",
87
+ "node:readline/promises": ">= 17",
48
88
  "repl": true,
89
+ "node:repl": [">= 14.18 && < 15", ">= 16"],
49
90
  "smalloc": ">= 0.11.5 && < 3",
50
91
  "_stream_duplex": ">= 0.9.4",
92
+ "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
51
93
  "_stream_transform": ">= 0.9.4",
94
+ "node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
52
95
  "_stream_wrap": ">= 1.4.1",
96
+ "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
53
97
  "_stream_passthrough": ">= 0.9.4",
98
+ "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
54
99
  "_stream_readable": ">= 0.9.4",
100
+ "node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
55
101
  "_stream_writable": ">= 0.9.4",
102
+ "node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
56
103
  "stream": true,
104
+ "node:stream": [">= 14.18 && < 15", ">= 16"],
105
+ "stream/consumers": ">= 16.7",
106
+ "node:stream/consumers": ">= 16.7",
57
107
  "stream/promises": ">= 15",
108
+ "node:stream/promises": ">= 16",
109
+ "stream/web": ">= 16.5",
110
+ "node:stream/web": ">= 16.5",
58
111
  "string_decoder": true,
112
+ "node:string_decoder": [">= 14.18 && < 15", ">= 16"],
59
113
  "sys": [">= 0.6 && < 0.7", ">= 0.8"],
114
+ "node:sys": [">= 14.18 && < 15", ">= 16"],
60
115
  "timers": true,
116
+ "node:timers": [">= 14.18 && < 15", ">= 16"],
61
117
  "timers/promises": ">= 15",
118
+ "node:timers/promises": ">= 16",
62
119
  "_tls_common": ">= 0.11.13",
120
+ "node:_tls_common": [">= 14.18 && < 15", ">= 16"],
63
121
  "_tls_legacy": ">= 0.11.3 && < 10",
64
122
  "_tls_wrap": ">= 0.11.3",
123
+ "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
65
124
  "tls": true,
125
+ "node:tls": [">= 14.18 && < 15", ">= 16"],
66
126
  "trace_events": ">= 10",
127
+ "node:trace_events": [">= 14.18 && < 15", ">= 16"],
67
128
  "tty": true,
129
+ "node:tty": [">= 14.18 && < 15", ">= 16"],
68
130
  "url": true,
131
+ "node:url": [">= 14.18 && < 15", ">= 16"],
69
132
  "util": true,
133
+ "node:util": [">= 14.18 && < 15", ">= 16"],
70
134
  "util/types": ">= 15.3",
135
+ "node:util/types": ">= 16",
71
136
  "v8/tools/arguments": ">= 10 && < 12",
72
- "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
73
- "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
74
- "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
75
- "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
76
- "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
77
- "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
137
+ "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
138
+ "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
139
+ "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
140
+ "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
141
+ "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
142
+ "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
78
143
  "v8": ">= 1",
144
+ "node:v8": [">= 14.18 && < 15", ">= 16"],
79
145
  "vm": true,
146
+ "node:vm": [">= 14.18 && < 15", ">= 16"],
80
147
  "wasi": ">= 13.4 && < 13.5",
81
148
  "worker_threads": ">= 11.7",
82
- "zlib": true
149
+ "node:worker_threads": [">= 14.18 && < 15", ">= 16"],
150
+ "zlib": true,
151
+ "node:zlib": [">= 14.18 && < 15", ">= 16"]
83
152
  }
@@ -1,5 +1,5 @@
1
1
  var path = require('path');
2
- var parse = path.parse || require('path-parse');
2
+ var parse = path.parse || require('path-parse'); // eslint-disable-line global-require
3
3
 
4
4
  var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
5
5
  var prefix = '/';
@@ -9,22 +9,22 @@ var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function'
9
9
 
10
10
  var defaultIsFile = function isFile(file) {
11
11
  try {
12
- var stat = fs.statSync(file);
12
+ var stat = fs.statSync(file, { throwIfNoEntry: false });
13
13
  } catch (e) {
14
14
  if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
15
15
  throw e;
16
16
  }
17
- return stat.isFile() || stat.isFIFO();
17
+ return !!stat && (stat.isFile() || stat.isFIFO());
18
18
  };
19
19
 
20
20
  var defaultIsDir = function isDirectory(dir) {
21
21
  try {
22
- var stat = fs.statSync(dir);
22
+ var stat = fs.statSync(dir, { throwIfNoEntry: false });
23
23
  } catch (e) {
24
24
  if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
25
25
  throw e;
26
26
  }
27
- return stat.isDirectory();
27
+ return !!stat && stat.isDirectory();
28
28
  };
29
29
 
30
30
  var defaultRealpathSync = function realpathSync(x) {
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "resolve",
3
3
  "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously",
4
- "version": "1.20.0",
4
+ "version": "1.21.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git://github.com/browserify/resolve.git"
8
8
  },
9
+ "bin": {
10
+ "resolve": "./bin/resolve"
11
+ },
9
12
  "main": "index.js",
10
13
  "keywords": [
11
14
  "resolve",
@@ -14,9 +17,10 @@
14
17
  "module"
15
18
  ],
16
19
  "scripts": {
17
- "prepublish": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/ ||:",
18
- "prelint": "eclint check '**/*'",
19
- "lint": "eslint --ext=js,mjs .",
20
+ "prepublishOnly": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/ ||:",
21
+ "prepublish": "not-in-publish || npm run prepublishOnly",
22
+ "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
23
+ "lint": "eslint --ext=js,mjs --no-eslintrc -c .eslintrc . 'bin/**'",
20
24
  "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async",
21
25
  "tests-only": "tape test/*.js",
22
26
  "pretest": "npm run lint",
@@ -25,15 +29,16 @@
25
29
  "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test"
26
30
  },
27
31
  "devDependencies": {
28
- "@ljharb/eslint-config": "^17.5.1",
29
- "array.prototype.map": "^1.0.3",
30
- "aud": "^1.1.4",
32
+ "@ljharb/eslint-config": "^20.1.0",
33
+ "array.prototype.map": "^1.0.4",
34
+ "aud": "^1.1.5",
31
35
  "eclint": "^2.8.1",
32
- "eslint": "^7.19.0",
36
+ "eslint": "^8.6.0",
37
+ "in-publish": "^2.0.1",
33
38
  "object-keys": "^1.1.1",
34
- "safe-publish-latest": "^1.1.4",
39
+ "safe-publish-latest": "^2.0.0",
35
40
  "tap": "0.4.13",
36
- "tape": "^5.1.1"
41
+ "tape": "^5.4.0"
37
42
  },
38
43
  "license": "MIT",
39
44
  "author": {
@@ -45,7 +50,8 @@
45
50
  "url": "https://github.com/sponsors/ljharb"
46
51
  },
47
52
  "dependencies": {
48
- "is-core-module": "^2.2.0",
49
- "path-parse": "^1.0.6"
53
+ "is-core-module": "^2.8.0",
54
+ "path-parse": "^1.0.7",
55
+ "supports-preserve-symlinks-flag": "^1.0.0"
50
56
  }
51
57
  }
@@ -1,18 +1,22 @@
1
- # resolve
1
+ # resolve <sup>[![Version Badge][2]][1]</sup>
2
2
 
3
- implements the [node `require.resolve()`
4
- algorithm](https://nodejs.org/api/modules.html#modules_all_together)
5
- such that you can `require.resolve()` on behalf of a file asynchronously and
6
- synchronously
3
+ implements the [node `require.resolve()` algorithm](https://nodejs.org/api/modules.html#modules_all_together) such that you can `require.resolve()` on behalf of a file asynchronously and synchronously
7
4
 
8
- [![build status](https://secure.travis-ci.org/browserify/resolve.png)](http://travis-ci.org/browserify/resolve)
5
+ [![github actions][actions-image]][actions-url]
6
+ [![coverage][codecov-image]][codecov-url]
7
+ [![dependency status][5]][6]
8
+ [![dev dependency status][7]][8]
9
+ [![License][license-image]][license-url]
10
+ [![Downloads][downloads-image]][downloads-url]
11
+
12
+ [![npm badge][11]][1]
9
13
 
10
14
  # example
11
15
 
12
16
  asynchronously resolve:
13
17
 
14
18
  ```js
15
- var resolve = require('resolve');
19
+ var resolve = require('resolve/async'); // or, require('resolve')
16
20
  resolve('tap', { basedir: __dirname }, function (err, res) {
17
21
  if (err) console.error(err);
18
22
  else console.log(res);
@@ -27,8 +31,8 @@ $ node example/async.js
27
31
  synchronously resolve:
28
32
 
29
33
  ```js
30
- var resolve = require('resolve');
31
- var res = resolve.sync('tap', { basedir: __dirname });
34
+ var resolve = require('resolve/sync'); // or, `require('resolve').sync
35
+ var res = resolve('tap', { basedir: __dirname });
32
36
  console.log(res);
33
37
  ```
34
38
 
@@ -41,6 +45,8 @@ $ node example/sync.js
41
45
 
42
46
  ```js
43
47
  var resolve = require('resolve');
48
+ var async = require('resolve/async');
49
+ var sync = require('resolve/sync');
44
50
  ```
45
51
 
46
52
  For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values:
@@ -67,7 +73,7 @@ options are:
67
73
 
68
74
  * opts.isFile - function to asynchronously test whether a file exists
69
75
 
70
- * opts.isDirectory - function to asynchronously test whether a directory exists
76
+ * opts.isDirectory - function to asynchronously test whether a file exists and is a directory
71
77
 
72
78
  * opts.realpath - function to asynchronously resolve a potential symlink to its real path
73
79
 
@@ -79,7 +85,7 @@ options are:
79
85
  * `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field
80
86
  * pkg - package data
81
87
  * pkgfile - path to package.json
82
- * dir - directory for package.json
88
+ * dir - directory that contains package.json
83
89
 
84
90
  * `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
85
91
  * pkg - package data
@@ -177,7 +183,7 @@ options are:
177
183
 
178
184
  * opts.isFile - function to synchronously test whether a file exists
179
185
 
180
- * opts.isDirectory - function to synchronously test whether a directory exists
186
+ * opts.isDirectory - function to synchronously test whether a file exists and is a directory
181
187
 
182
188
  * opts.realpathSync - function to synchronously resolve a potential symlink to its real path
183
189
 
@@ -187,7 +193,7 @@ options are:
187
193
 
188
194
  * `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field
189
195
  * pkg - package data
190
- * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2)
196
+ * dir - directory that contains package.json (Note: the second argument will change to "pkgfile" in v2)
191
197
 
192
198
  * `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
193
199
  * pkg - package data
@@ -277,3 +283,19 @@ npm install resolve
277
283
  # license
278
284
 
279
285
  MIT
286
+
287
+ [1]: https://npmjs.org/package/resolve
288
+ [2]: https://versionbadg.es/browserify/resolve.svg
289
+ [5]: https://david-dm.org/browserify/resolve.svg
290
+ [6]: https://david-dm.org/browserify/resolve
291
+ [7]: https://david-dm.org/browserify/resolve/dev-status.svg
292
+ [8]: https://david-dm.org/browserify/resolve#info=devDependencies
293
+ [11]: https://nodei.co/npm/resolve.png?downloads=true&stars=true
294
+ [license-image]: https://img.shields.io/npm/l/resolve.svg
295
+ [license-url]: LICENSE
296
+ [downloads-image]: https://img.shields.io/npm/dm/resolve.svg
297
+ [downloads-url]: https://npm-stat.com/charts.html?package=resolve
298
+ [codecov-image]: https://codecov.io/gh/browserify/resolve/branch/main/graphs/badge.svg
299
+ [codecov-url]: https://app.codecov.io/gh/browserify/resolve/
300
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/resolve
301
+ [actions-url]: https://github.com/browserify/resolve/actions
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./lib/sync');
@@ -122,9 +122,8 @@ test('symlinked', function (t) {
122
122
  var dir = path.dirname(resolved);
123
123
  var base = path.basename(resolved);
124
124
  return path.join(dir, 'symlinked', base);
125
- } else {
126
- return path.join(resolved, 'symlinked');
127
125
  }
126
+ return path.join(resolved, 'symlinked');
128
127
  }
129
128
  };
130
129
  }
@@ -183,9 +182,8 @@ test('readPackageSync', function (t) {
183
182
  var readPackageSync = function (readFileSync, file) {
184
183
  if (file.indexOf(path.join('bar', 'package.json')) >= 0) {
185
184
  return { main: './something-else.js' };
186
- } else {
187
- return JSON.parse(files[path.resolve(file)]);
188
185
  }
186
+ return JSON.parse(files[path.resolve(file)]);
189
187
  };
190
188
 
191
189
  t.test('with readPackage', function (st) {
@@ -63,7 +63,7 @@ test('$NODE_PATH', function (t) {
63
63
  basedir: path.join(__dirname, 'node_path/x'),
64
64
  isDirectory: isDir
65
65
  }, function (err, res) {
66
- var root = require('tap/package.json').main;
66
+ var root = require('tap/package.json').main; // eslint-disable-line global-require
67
67
  t.error(err);
68
68
  t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves');
69
69
  });
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "invalid main",
2
+ "name": "invalid_main",
3
3
  "main": [
4
4
  "why is this a thing",
5
5
  "srsly omg wtf"