@parcel/node-resolver-core
Advanced tools
Comparing version 3.3.1-nightly.3142 to 3.4.0
@@ -22,3 +22,3 @@ "use strict"; | ||
var _package = _interopRequireDefault(require("../package.json")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
// $FlowFixMe this is untyped | ||
@@ -25,0 +25,0 @@ // flowlint-next-line untyped-import:off |
@@ -32,2 +32,2 @@ "use strict"; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } |
@@ -64,5 +64,5 @@ "use strict"; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } | ||
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | ||
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | ||
// Package.json fields. Must match package_json.rs. | ||
@@ -74,2 +74,5 @@ const MAIN = 1 << 0; | ||
const TYPES = 1 << 6; | ||
const IS_FILE = 1 << 0; | ||
const IS_DIR = 1 << 1; | ||
const IS_SYMLINK = 1 << 2; | ||
class NodeResolver { | ||
@@ -90,3 +93,2 @@ constructor(options) { | ||
if (!resolver) { | ||
var _this$options$package; | ||
await (_rust().init === null || _rust().init === void 0 ? void 0 : (0, _rust().init)()); | ||
@@ -97,6 +99,22 @@ resolver = new (_rust().Resolver)(this.options.projectRoot, { | ||
!_rust().init ? undefined : { | ||
canonicalize: path => this.options.fs.realpathSync(path), | ||
read: path => this.options.fs.readFileSync(path), | ||
isFile: path => this.options.fs.statSync(path).isFile(), | ||
isDir: path => this.options.fs.statSync(path).isDirectory() | ||
kind: path => { | ||
let flags = 0; | ||
try { | ||
let stat = this.options.fs.lstatSync(path); | ||
if (stat.isSymbolicLink()) { | ||
flags |= IS_SYMLINK; | ||
stat = this.options.fs.statSync(path); | ||
} | ||
if (stat.isFile()) { | ||
flags |= IS_FILE; | ||
} else if (stat.isDirectory()) { | ||
flags |= IS_DIR; | ||
} | ||
} catch (err) { | ||
// ignore | ||
} | ||
return flags; | ||
}, | ||
readLink: path => this.options.fs.readlinkSync(path) | ||
}, | ||
@@ -108,3 +126,3 @@ mode: 1, | ||
conditions: environmentToExportsConditions(options.env, this.options.mode), | ||
packageExports: (_this$options$package = this.options.packageExports) !== null && _this$options$package !== void 0 ? _this$options$package : false, | ||
packageExports: this.options.packageExports ?? false, | ||
moduleDirResolver: process.versions.pnp != null ? (module, from) => { | ||
@@ -147,3 +165,3 @@ // $FlowFixMe[prop-missing] | ||
return { | ||
diagnostics: Array.isArray(diagnostic) ? diagnostic : diagnostic ? [diagnostic] : [], | ||
diagnostics: Array.isArray(diagnostic) ? diagnostic : diagnostic ? [diagnostic] : undefined, | ||
invalidateOnFileCreate: res.invalidateOnFileCreate, | ||
@@ -320,3 +338,2 @@ invalidateOnFileChange: res.invalidateOnFileChange | ||
); | ||
return { | ||
@@ -323,0 +340,0 @@ message: (0, _diagnostic().md)`Cannot load file '${relative}' in '${(0, _utils().relativePath)(this.options.projectRoot, dir)}'.`, |
{ | ||
"name": "@parcel/node-resolver-core", | ||
"version": "3.3.1-nightly.3142+40c370f09", | ||
"version": "3.4.0", | ||
"license": "MIT", | ||
@@ -19,3 +19,3 @@ "publishConfig": { | ||
"engines": { | ||
"node": ">= 12.0.0" | ||
"node": ">= 16.0.0" | ||
}, | ||
@@ -30,6 +30,6 @@ "scripts": { | ||
"@mischnic/json-sourcemap": "^0.1.0", | ||
"@parcel/diagnostic": "2.0.0-nightly.1519+40c370f09", | ||
"@parcel/fs": "2.0.0-nightly.1519+40c370f09", | ||
"@parcel/rust": "2.12.1-nightly.3142+40c370f09", | ||
"@parcel/utils": "2.0.0-nightly.1519+40c370f09", | ||
"@parcel/diagnostic": "2.13.0", | ||
"@parcel/fs": "2.13.0", | ||
"@parcel/rust": "2.13.0", | ||
"@parcel/utils": "2.13.0", | ||
"nullthrows": "^1.1.1", | ||
@@ -45,3 +45,3 @@ "semver": "^7.5.2" | ||
"crypto-browserify": "^3.12.0", | ||
"domain-browser": "^3.5.0", | ||
"domain-browser": "^5.7.0", | ||
"events": "^3.1.0", | ||
@@ -52,3 +52,3 @@ "https-browserify": "^1.0.0", | ||
"process": "^0.11.10", | ||
"punycode": "^1.4.1", | ||
"punycode": "^2.3.1", | ||
"querystring-es3": "^0.2.1", | ||
@@ -67,3 +67,3 @@ "stream-browserify": "^3.0.0", | ||
}, | ||
"gitHead": "40c370f09a1c4b7eee5a6ad2b1b74fb95a04f389" | ||
"gitHead": "a53f8f3ba1025c7ea8653e9719e0a61ef9717079" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
31754
759
1
0
+ Added@lmdb/lmdb-darwin-arm64@2.8.5(transitive)
+ Added@lmdb/lmdb-darwin-x64@2.8.5(transitive)
+ Added@lmdb/lmdb-linux-arm@2.8.5(transitive)
+ Added@lmdb/lmdb-linux-arm64@2.8.5(transitive)
+ Added@lmdb/lmdb-linux-x64@2.8.5(transitive)
+ Added@lmdb/lmdb-win32-x64@2.8.5(transitive)
+ Added@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3(transitive)
+ Added@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3(transitive)
+ Added@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3(transitive)
+ Added@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3(transitive)
+ Added@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3(transitive)
+ Added@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3(transitive)
+ Added@parcel/cache@2.13.0(transitive)
+ Added@parcel/codeframe@2.13.0(transitive)
+ Added@parcel/core@2.13.0(transitive)
+ Added@parcel/diagnostic@2.13.0(transitive)
+ Added@parcel/events@2.13.0(transitive)
+ Added@parcel/feature-flags@2.13.0(transitive)
+ Added@parcel/fs@2.13.0(transitive)
+ Added@parcel/graph@3.3.0(transitive)
+ Added@parcel/logger@2.13.0(transitive)
+ Added@parcel/markdown-ansi@2.13.0(transitive)
+ Added@parcel/package-manager@2.13.0(transitive)
+ Added@parcel/plugin@2.13.0(transitive)
+ Added@parcel/profiler@2.13.0(transitive)
+ Added@parcel/rust@2.13.0(transitive)
+ Added@parcel/source-map@2.1.1(transitive)
+ Added@parcel/types@2.13.0(transitive)
+ Added@parcel/types-internal@2.13.0(transitive)
+ Added@parcel/utils@2.13.0(transitive)
+ Added@parcel/watcher@2.5.0(transitive)
+ Added@parcel/watcher-android-arm64@2.5.0(transitive)
+ Added@parcel/watcher-darwin-arm64@2.5.0(transitive)
+ Added@parcel/watcher-darwin-x64@2.5.0(transitive)
+ Added@parcel/watcher-freebsd-x64@2.5.0(transitive)
+ Added@parcel/watcher-linux-arm-glibc@2.5.0(transitive)
+ Added@parcel/watcher-linux-arm-musl@2.5.0(transitive)
+ Added@parcel/watcher-linux-arm64-glibc@2.5.0(transitive)
+ Added@parcel/watcher-linux-arm64-musl@2.5.0(transitive)
+ Added@parcel/watcher-linux-x64-glibc@2.5.0(transitive)
+ Added@parcel/watcher-linux-x64-musl@2.5.0(transitive)
+ Added@parcel/watcher-win32-arm64@2.5.0(transitive)
+ Added@parcel/watcher-win32-ia32@2.5.0(transitive)
+ Added@parcel/watcher-win32-x64@2.5.0(transitive)
+ Added@parcel/workers@2.13.0(transitive)
+ Added@swc/core@1.9.2(transitive)
+ Added@swc/core-darwin-arm64@1.9.2(transitive)
+ Added@swc/core-darwin-x64@1.9.2(transitive)
+ Added@swc/core-linux-arm-gnueabihf@1.9.2(transitive)
+ Added@swc/core-linux-arm64-gnu@1.9.2(transitive)
+ Added@swc/core-linux-arm64-musl@1.9.2(transitive)
+ Added@swc/core-linux-x64-gnu@1.9.2(transitive)
+ Added@swc/core-linux-x64-musl@1.9.2(transitive)
+ Added@swc/core-win32-arm64-msvc@1.9.2(transitive)
+ Added@swc/core-win32-ia32-msvc@1.9.2(transitive)
+ Added@swc/core-win32-x64-msvc@1.9.2(transitive)
+ Added@swc/counter@0.1.3(transitive)
+ Added@swc/types@0.1.15(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedbase-x@3.0.10(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedbrowserslist@4.24.2(transitive)
+ Addedcaniuse-lite@1.0.30001680(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedchrome-trace-event@1.0.4(transitive)
+ Addedclone@2.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addeddetect-libc@1.0.32.0.3(transitive)
+ Addeddotenv@16.4.5(transitive)
+ Addeddotenv-expand@11.0.7(transitive)
+ Addedelectron-to-chromium@1.5.63(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedlmdb@2.8.5(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedmsgpackr@1.11.2(transitive)
+ Addedmsgpackr-extract@3.0.3(transitive)
+ Addednode-addon-api@6.1.07.1.1(transitive)
+ Addednode-gyp-build-optional-packages@5.1.15.2.2(transitive)
+ Addednode-releases@2.0.18(transitive)
+ Addedordered-binary@1.5.3(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedutility-types@3.11.0(transitive)
+ Addedweak-lru-cache@1.2.2(transitive)
Updated@parcel/diagnostic@2.13.0
Updated@parcel/fs@2.13.0
Updated@parcel/rust@2.13.0
Updated@parcel/utils@2.13.0