-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pull in fix logic from normalize-package-data
This brings in the logic from `normalize-package-data` to be in this repo instead. It doesn't bring all of the logic, just the steps involved with "fix". There was some re-duplication of `bundleDependencies` that `normalize-package-data` was doing that has been removed. It was also completely re-implementing the script fixing, which we already call as part of "fix" so that was dropped.
- Loading branch information
Showing
7 changed files
with
520 additions
and
62 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/* IMPORTANT | ||
* This snapshot file is auto-generated, but designed for humans. | ||
* It should be checked into source control and tracked carefully. | ||
* Re-generate by setting TAP_SNAPSHOT=1 and running tests. | ||
* Make sure to inspect the output below. Do not ignore changes! | ||
*/ | ||
'use strict' | ||
exports[`test/fix.js TAP with changes binRefs scoped name > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixDependencies array dependencies > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"\\"dependencies\\" was converted from an array into an object", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixDependencies false dependencies > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"Removed invalid \\"dependencies\\"", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixDependencies git dependency > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"Normalized git reference to \\"dependencies.npm\\"", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixDependencies non-string dependency > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"Removed invalid \\"dependencies.npm\\"", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixDependencies string dependencies > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"\\"dependencies\\" was converted from a string into an object", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixNameField scoped whitespace > must match snapshot 1`] = ` | ||
Array [ | ||
"Whitespace was trimmed from \\"name\\"", | ||
"\\"bundleDependencies\\" was removed", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixNameField unscoped whitespace > must match snapshot 1`] = ` | ||
Array [ | ||
"Whitespace was trimmed from \\"name\\"", | ||
"\\"bundleDependencies\\" was removed", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixRepositoryField full > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"\\"repository\\" was changed from a string to an object", | ||
"\\"repository.url\\" was normalized to \\"git+https://github.com/npm/cli.git\\"", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixRepositoryField object no url > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixRepositoryField repositories array > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"\\"repository\\" was set to the first entry in \\"repositories\\" ([object Object])", | ||
"\\"repository\\" was changed from a string to an object", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixRepositoryField shortcut > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"\\"repository\\" was changed from a string to an object", | ||
"\\"repository.url\\" was normalized to \\"git+https://github.com/npm/cli.git\\"", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixVersionField none > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes fixVersionField unclean > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"version\\" was cleaned and set to \\"1.0.0\\"", | ||
"\\"bundleDependencies\\" was removed", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes scriptpath non-object script entry > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"Invalid scripts.\\"test\\" was removed", | ||
] | ||
` | ||
|
||
exports[`test/fix.js TAP with changes scriptpath non-object scripts > must match snapshot 1`] = ` | ||
Array [ | ||
"\\"bundleDependencies\\" was removed", | ||
"Removed invalid \\"scripts\\"", | ||
] | ||
` |
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
Oops, something went wrong.