Skip to content

Commit

Permalink
fix: typo in changes message
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Jul 5, 2023
1 parent e2bc4f3 commit ed68a28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase })
if (steps.includes('bundleDependencies')) {
const bd = data.bundleDependencies
if (bd === false && !steps.includes('bundleDependenciesDeleteFalse')) {
changes?.push(`"bundleDepdencies" was changed from "false" to "[]"`)
changes?.push(`"bundleDependencies" was changed from "false" to "[]"`)
data.bundleDependencies = []
} else if (bd === true) {
changes?.push(`"bundleDepdencies" was auto-populated from "dependencies"`)
changes?.push(`"bundleDependencies" was auto-populated from "dependencies"`)
data.bundleDependencies = Object.keys(data.dependencies || {})
} else if (bd && typeof bd === 'object') {
if (!Array.isArray(bd)) {
Expand Down
8 changes: 4 additions & 4 deletions tap-snapshots/test/normalize.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,31 @@ Array [
exports[`test/normalize.js TAP @npmcli/package-json - with changes clean up bundleDependencies handle bundleDependencies: false > must match snapshot 1`] = `
Array [
"Deleted incorrect \\"bundledDependencies\\"",
"\\"bundleDepdencies\\" was changed from \\"false\\" to \\"[]\\"",
"\\"bundleDependencies\\" was changed from \\"false\\" to \\"[]\\"",
"removed invalid \\"scripts\\"",
]
`

exports[`test/normalize.js TAP @npmcli/package-json - with changes clean up bundleDependencies handle bundleDependencies: true > must match snapshot 1`] = `
Array [
"Deleted incorrect \\"bundledDependencies\\"",
"\\"bundleDepdencies\\" was auto-populated from \\"dependencies\\"",
"\\"bundleDependencies\\" was auto-populated from \\"dependencies\\"",
"removed invalid \\"scripts\\"",
]
`

exports[`test/normalize.js TAP @npmcli/package-json - with changes clean up bundleDependencies handle bundleDependencies: true with no deps > must match snapshot 1`] = `
Array [
"Deleted incorrect \\"bundledDependencies\\"",
"\\"bundleDepdencies\\" was auto-populated from \\"dependencies\\"",
"\\"bundleDependencies\\" was auto-populated from \\"dependencies\\"",
"removed invalid \\"scripts\\"",
]
`

exports[`test/normalize.js TAP @npmcli/package-json - with changes clean up bundleDependencies handle bundledDependencies: true > must match snapshot 1`] = `
Array [
"Deleted incorrect \\"bundledDependencies\\"",
"\\"bundleDepdencies\\" was auto-populated from \\"dependencies\\"",
"\\"bundleDependencies\\" was auto-populated from \\"dependencies\\"",
"removed invalid \\"scripts\\"",
]
`
Expand Down

0 comments on commit ed68a28

Please sign in to comment.