Skip to content

Commit

Permalink
chore: update resolve.exports
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Oct 15, 2021
1 parent 7dd17d5 commit 3674bbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion e2e/resolve-conditions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"transform": {}
},
"dependencies": {
"resolve.exports": "^1.0.2"
"resolve.exports": "^1.1.0"
}
}
8 changes: 1 addition & 7 deletions e2e/resolve-conditions/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
};
}
10 changes: 5 additions & 5 deletions e2e/resolve-conditions/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ __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

"root-workspace-0b6124@workspace:.":
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

0 comments on commit 3674bbf

Please sign in to comment.