Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle pkg: imports with args #2193

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
* Allow the Node.js `pkg:` importer to load Sass stylesheets for `package.json`
`exports` field entries without extensions.

### JavaScript API

* Properly resolve `pkg:` imports with the Node.js package importer when
arguments are passed to the JavaScript process.

## 1.71.1

### Command-Line Interface
Expand Down
2 changes: 1 addition & 1 deletion lib/src/js/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Syntax parseSyntax(String? syntax) => switch (syntax) {
String? get entrypointFilename {
if (_requireMain?.filename case var filename?) {
return filename;
} else if (process.argv case [_, String path]) {
} else if (process.argv case [_, String path, ...]) {
return module.createRequire(path).resolve(path);
} else {
return null;
Expand Down
Loading