Skip to content

Commit 9af6bbf

Browse files
authored
Properly handle pkg: imports with args (#2193)
Closes #2188
1 parent 0330491 commit 9af6bbf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
* When printing suggestions for variables, use underscores in variable names
1010
when the original usage used underscores.
1111

12+
### JavaScript API
13+
14+
* Properly resolve `pkg:` imports with the Node.js package importer when
15+
arguments are passed to the JavaScript process.
16+
1217
## 1.71.1
1318

1419
### Command-Line Interface

lib/src/js/utils.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Syntax parseSyntax(String? syntax) => switch (syntax) {
239239
String? get entrypointFilename {
240240
if (_requireMain?.filename case var filename?) {
241241
return filename;
242-
} else if (process.argv case [_, String path]) {
242+
} else if (process.argv case [_, String path, ...]) {
243243
return module.createRequire(path).resolve(path);
244244
} else {
245245
return null;

0 commit comments

Comments
 (0)