From 3674bbff2629b1c8dc8df537f07cfc6232a14854 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 15 Oct 2021 09:33:15 +0200 Subject: [PATCH] chore: update resolve.exports --- e2e/resolve-conditions/package.json | 2 +- e2e/resolve-conditions/resolver.js | 8 +------- e2e/resolve-conditions/yarn.lock | 10 +++++----- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/e2e/resolve-conditions/package.json b/e2e/resolve-conditions/package.json index 987f46111b8a..33449adf2da3 100644 --- a/e2e/resolve-conditions/package.json +++ b/e2e/resolve-conditions/package.json @@ -13,6 +13,6 @@ "transform": {} }, "dependencies": { - "resolve.exports": "^1.0.2" + "resolve.exports": "^1.1.0" } } diff --git a/e2e/resolve-conditions/resolver.js b/e2e/resolve-conditions/resolver.js index 98c8aed1bf67..09cee4fb91a3 100644 --- a/e2e/resolve-conditions/resolver.js +++ b/e2e/resolve-conditions/resolver.js @@ -24,13 +24,7 @@ function createPathFilter(conditions) { const path = relativePath === 'index' ? '.' : relativePath; return ( - resolveExports(pkg, path, { - // `resolve.exports adds `node` unless `browser` is `false`, so let's add this ugly thing - browser: conditions.includes('browser'), - conditions, - // `resolve.exports adds `import` unless `require` is `false`, so let's add this ugly thing - require: conditions.includes('require'), - }) || relativePath + resolveExports(pkg, path, {conditions, unsafe: true}) || relativePath ); }; } diff --git a/e2e/resolve-conditions/yarn.lock b/e2e/resolve-conditions/yarn.lock index b98bb300b2b9..df2f59b137b1 100644 --- a/e2e/resolve-conditions/yarn.lock +++ b/e2e/resolve-conditions/yarn.lock @@ -5,10 +5,10 @@ __metadata: version: 4 cacheKey: 7 -"resolve.exports@npm:^1.0.2": - version: 1.0.2 - resolution: "resolve.exports@npm:1.0.2" - checksum: 012a46e3ae41c53762abf5b50ea1b4adf2de617bbea1dbc7bf6e609c1ceaedee7782acbc92d443951d5dd0c3a8fb1090ce73285a9ccc24b530e33b5e09ae196f +"resolve.exports@npm:^1.1.0": + version: 1.1.0 + resolution: "resolve.exports@npm:1.1.0" + checksum: d04d2ce651fac14fe6ba13b377690f790cbbe91e6211b8fbec97ee08282e278875c74073a9b6243143a64e33d95eefb479e1dd4965664edc73b28b712100b36c languageName: node linkType: hard @@ -16,6 +16,6 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: - resolve.exports: ^1.0.2 + resolve.exports: ^1.1.0 languageName: unknown linkType: soft