You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 27, 2019. It is now read-only.
After running jpm init on a non-empty folder (it only had a package.json and locally installed jpm in node_modules), I noticed that jpm seems to have its own set of default values and doesn't respect previous values in package.json that it's attempting to overwrite, leading to data loss.
This could be kind of dangerous, if I was publishing this module to npm, since you'd potentially be publishing as an unexpected version number, or the incorrect package name.
Steps to reproduce:
Start a new project via $ npm init -y which uses default values.
Tweak the values (ie: change the package.json name, add a description and some keywords, etc).
Run jpm init.
Actual results:
Before running jpm init, my beautiful hypothetical package.json looked like:
From what I understand jpm init is only supposed to run against an empty directory. I guess it doesn't complain about it, but that's what it's intended use is. It will essentially write a new package.json based on your choices in the jpm init wizzard (plus some good default values, like the jetpack keyword).
Or else tweak the lib/init-input.js file to read the current directory's package.json (if it exists) and use those values as the defaults, and then fall back to the current hard-coded values.
I kinda hate jpm init. I would much rather have something like ember new.
Ah, interesting! I've never tried Ember, but I'll check out their ember new scaffolding.
We were actually discussing initialization templates over in mozilla/shield-study-cli#14 and I was curious why you prefer the ember new behavior over the current jpm init or something else. /cc @gregglind
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Found in:
$ ./node_modules/.bin/jpm --version # 1.2.0
After running
jpm init
on a non-empty folder (it only had a package.json and locally installed jpm in node_modules), I noticed that jpm seems to have its own set of default values and doesn't respect previous values in package.json that it's attempting to overwrite, leading to data loss.This could be kind of dangerous, if I was publishing this module to npm, since you'd potentially be publishing as an unexpected version number, or the incorrect package name.
Steps to reproduce:
$ npm init -y
which uses default values.name
, add adescription
and somekeywords
, etc).jpm init
.Actual results:
Before running
jpm init
, my beautiful hypothetical package.json looked like:After running
jpm init
, my package.json looks like:TL;DR
name
was changed. (pre: "jpm-init-tester", post: "jpm-init-test")description
was changed. (pre: "stuff and things", post: "A basic add-on")version
was changed. (pre: "1.0.0", post: "0.0.1")keywords
were changed. (pre: ["foo", "bar"], post: ["jetpack"])license
was changed. (pre: "WTFPL", post: "MIT")author
was deleted.scripts
were deleted.dependencies
anddevDependencies
were deleted.The text was updated successfully, but these errors were encountered: