@yarnpkg/esbuild-plugin-pnp
Advanced tools
Comparing version 0.0.1 to 1.0.0-rc.1
@@ -5,3 +5,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const fs = tslib_1.__importStar(require("fs")); | ||
const fs = (0, tslib_1.__importStar)(require("fs")); | ||
const matchAll = /()/; | ||
@@ -31,7 +31,2 @@ const defaultExtensions = [`.tsx`, `.ts`, `.jsx`, `.mjs`, `.cjs`, `.js`, `.css`, `.json`]; | ||
build.onResolve({ filter }, args => { | ||
// In theory we should delegate to the real resolution, but ESBuild | ||
// doesn't currently offer any way to do that. | ||
const pnpApi = findPnpApi(args.importer); | ||
if (!pnpApi) | ||
throw new Error(`Path is external to the project`); | ||
// The entry point resolution uses an empty string | ||
@@ -41,2 +36,6 @@ const effectiveImporter = args.importer | ||
: `${baseDir}/`; | ||
const pnpApi = findPnpApi(effectiveImporter); | ||
if (!pnpApi) | ||
// Path isn't controlled by PnP so delegate to the next resolver in the chain | ||
return undefined; | ||
const path = pnpApi.resolveRequest(args.path, effectiveImporter, { | ||
@@ -43,0 +42,0 @@ considerBuiltins: true, |
{ | ||
"name": "@yarnpkg/esbuild-plugin-pnp", | ||
"version": "0.0.1", | ||
"version": "1.0.0-rc.1", | ||
"license": "BSD-2-Clause", | ||
@@ -13,3 +13,3 @@ "main": "./lib/index.js", | ||
"devDependencies": { | ||
"@yarnpkg/pnp": "^2.3.2", | ||
"@yarnpkg/pnp": "^3.0.0-rc.1", | ||
"esbuild": "npm:esbuild-wasm@^0.8.36" | ||
@@ -38,4 +38,5 @@ }, | ||
}, | ||
"stableVersion": "0.0.1", | ||
"bin": "./lib/cli.js", | ||
"typings": "./lib/index.d.ts" | ||
} |
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
3906
62