Handle empty subpath in exports (#3735)

This commit is contained in:
James Stuckey Weber 2023-11-03 17:41:45 -04:00 committed by Natalie Weizenbaum
parent 6cc3abf6ee
commit 55969c0160
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
## Draft 1.3
* Handle empty subpath in "Resolving package exports" subprocedure.
## Draft 1.2
* Export `NodePackageImporter` type, and set `_NodePackageImporterBrand` to

View File

@ -1,4 +1,4 @@
# Package Importer: Draft 1.2
# Package Importer: Draft 1.3
*([Issue](https://github.com/sass/sass/issues/2739))*
@ -440,7 +440,9 @@ This algorithm takes a package.json value `packageManifest`, a directory URL
* If `exports` is undefined, return null.
* Let `subpathVariants` be the result of [Export load paths] with `subpath`.
* If `subpath` is empty, let `subpathVariants` be an array with the string `.`.
Otherwise, let `subpathVariants` be the result of [Export load paths] with
`subpath`.
* Let `resolvedPaths` be a list of the results of calling
`PACKAGE_EXPORTS_RESOLVE(packageRoot, subpathVariant, exports, ["sass",