-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed bin regex * Removed unsupported by Windows colon from bin regex * Updated normalize-manifest tests * Update fix.js * Update actual.json * Update normalize-manifest.js.snap Co-authored-by: Maël Nison <nison.mael@gmail.com>
- Loading branch information
1 parent
1b334e6
commit af4c205
Showing
4 changed files
with
20 additions
and
11 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
18 changes: 11 additions & 7 deletions
18
__tests__/fixtures/normalize-manifest/dangerous bin name/actual.json
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
{ | ||
"name": "foo", | ||
"version": "", | ||
"bin": { | ||
"/tmp/foo": "main.js", | ||
"../tmp/foo": "main.js", | ||
"tmp/../../foo": "main.js" | ||
} | ||
"name": "foo", | ||
"version": "", | ||
"bin": { | ||
".": "main.js", | ||
"..": "main.js", | ||
"/tmp/foo": "main.js", | ||
"../tmp/foo": "main.js", | ||
"tmp/../../foo": "main.js", | ||
"build:cli": "main.js", | ||
"build.cli": "main.js" | ||
} | ||
} |
8 changes: 5 additions & 3 deletions
8
__tests__/fixtures/normalize-manifest/dangerous bin name/expected.json
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"name": "foo", | ||
"version": "", | ||
"bin": {} | ||
"name": "foo", | ||
"version": "", | ||
"bin": { | ||
"build.cli": "main.js" | ||
} | ||
} |
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