Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init command is not self upgrading to latest (sem) version of Greenwood #809

Closed
1 of 5 tasks
thescientist13 opened this issue Nov 29, 2021 · 0 comments · Fixed by #816
Closed
1 of 5 tasks

init command is not self upgrading to latest (sem) version of Greenwood #809

thescientist13 opened this issue Nov 29, 2021 · 0 comments · Fixed by #816
Assignees
Labels
alpha.1 bug Something isn't working help wanted Extra attention is needed Init invalid This doesn't seem right v0.20.0
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

Maybe it's just my misunderstanding of how things should work but currently, our init scaffolding will drop a package.json like this

owenbuckley@Owens-MBP-2 blank-app % cat package.json
{
  "name": "blank-app",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "start": "greenwood develop",
    "build": "greenwood build",
    "serve": "greenwood serve"
  },
  "devDependencies": {
    "@greenwood/cli": "^0.18.0"
  },
  "license": "ISC"
}

Then, when using --install (npm) or --yarn flags, it will install dependencies.

However, for both npm and Yarn, they both stay "stuck" at 0.18.0, instead of latest, which at the time of this writing would be 0.19.3. 😕

# npm
% npm ls @greenwood/cli
npm-app@1.0.0 /Users/owenbuckley/Desktop/npm-app
└── @greenwood/cli@0.18.0

# yarn
 % yarn why @greenwood/cli
yarn why v1.22.5
[1/4] 🤔  Why do we have the module "@greenwood/cli"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "@greenwood/cli@0.18.0"
info Has been hoisted to "@greenwood/cli"
info This module exists because it's specified in "devDependencies".
info Disk size without dependencies: "284KB"
info Disk size with unique dependencies: "272.14MB"
info Disk size with transitive dependencies: "314.14MB"
info Number of shared dependencies: 35
✨  Done in 0.61s.

Details

I guess my assumption was that due to using the ^ in package.json, npm or Yarn would upgrade to anything below 1.x.x? Maybe we need to run an additional update command? Basically, just want users to get the latest stable version within a given semver major range, as defined in package.json.

Or, we just implement #781 , which I had mainly intended as a way to keep the semver range in sync, but would in theory solve the problem here as well?

Either way, would be good to know what should / shouldn't be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.1 bug Something isn't working help wanted Extra attention is needed Init invalid This doesn't seem right v0.20.0
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant