Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/node-resolver-core

Package Overview
Dependencies
Maintainers
1
Versions
871
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/node-resolver-core - npm Package Compare versions

Comparing version 3.3.1-nightly.3142 to 3.4.0

2

lib/builtins.js

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc