-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: refine package name validation
PR-URL: #28965 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: Rich Trott <[email protected]>
- Loading branch information
1 parent
7b7b8f2
commit 491b46d
Showing
4 changed files
with
53 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Flags: --experimental-modules | ||
|
||
import { mustCall } from '../common/index.mjs'; | ||
import { strictEqual } from 'assert'; | ||
|
||
import { importFixture } from '../fixtures/pkgexports.mjs'; | ||
|
||
importFixture('as%2Ff').catch(mustCall((err) => { | ||
strictEqual(err.code, 'ERR_INVALID_MODULE_SPECIFIER'); | ||
})); | ||
|
||
importFixture('as\\df').catch(mustCall((err) => { | ||
strictEqual(err.code, 'ERR_INVALID_MODULE_SPECIFIER'); | ||
})); | ||
|
||
importFixture('@as@df').catch(mustCall((err) => { | ||
strictEqual(err.code, 'ERR_INVALID_MODULE_SPECIFIER'); | ||
})); |