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 creates a new package.json with an older version #424

Closed
miketheman opened this issue May 18, 2020 · 6 comments
Closed

init creates a new package.json with an older version #424

miketheman opened this issue May 18, 2020 · 6 comments
Labels

Comments

@miketheman
Copy link

miketheman commented May 18, 2020

Hello!

I was trying this out today, and found this behavior confusing:

  1. Create a new package.json in an empty directory
  2. Run yarn add --dev style-dictionary - get latest version 2.10.0
  3. Run yarn run style-dictionary init complete - the package.json gets templated value:
...
  "devDependencies": {
    "style-dictionary": "2.9.0"
  }
...

I would expect that the generated template match the version installed - unless this is some other behavior?

@dbanksdesign
Copy link
Member

This is definitely a bug. Looks like a botched release on my part, the package.json in the complete example did not get updated in the last release: https://github.com/amzn/style-dictionary/blob/master/examples/complete/package.json#L14

@chazzmoney
Copy link
Collaborator

@dbanksdesign this is still in the codebase, lol...

Can we just set to '*'?

@dbanksdesign
Copy link
Member

We could.... I don't know if that is a bad practice or not, I haven't seen '*' in very many package.json files. Let's take a look at how some other frameworks handle this.

@chazzmoney
Copy link
Collaborator

I mean, we could add it to the process for creating a tagged release... but it would be better if that was automated

@dbanksdesign
Copy link
Member

We have a pre-version script that should bump up all the version numbers of the examples, but it might be broken... If we moved the repository to a monorepo with each example as its own package then I think this could be handled nicer without a custom script... Maybe something to look in to.

@dbanksdesign
Copy link
Member

Fixed this in #755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants