Skip to content

Add missing YARN lock file.#61

Merged
theimowski merged 1 commit intoSAFE-Stack:masterfrom
isaacabraham:yarn-lock
Apr 23, 2018
Merged

Add missing YARN lock file.#61
theimowski merged 1 commit intoSAFE-Stack:masterfrom
isaacabraham:yarn-lock

Conversation

@isaacabraham
Copy link
Copy Markdown
Member

Without the lockfile and the current configuration in the FAKE script of frozen-lockfile, Yarn will always go back to NPM to construct the lock file, both on the initial creation of a project from the template and on repeated builds.

This inserts a lock file into the template to prevent this happening. Alternatively, we should remove the frozen-lockfile argument. This would force an initial build of the lock file but (AFAIK) would afterwards simply restore packages from the lock file as per Paket restore, rather than rebuilding the lock file every time.

@forki
Copy link
Copy Markdown
Member

forki commented Apr 23, 2018

Alternatively, we should remove the frozen-lockfile argument.

nooo

;-)

@isaacabraham
Copy link
Copy Markdown
Member Author

@forki hey, just giving alternatives here :-) That approach has its benefits - it would mean that the template would naturally pick up the latest version of dependencies (or at least transitives) after running the template. By committing the yarn lock file, it means that we'll probably need to periodically update it for distribution (and users will need to update the template on their machines), but it guarantees a stable and consistent lock.

@theimowski
Copy link
Copy Markdown
Member

For now I think we can lock the dependencies.
For Paket I deliberately removed lock file due to various template parameters - e.g. --Server adds different deps to paket, same with --Remoting
JS packages currently have no dependency on parameters so I'm fine with having the lock file initially (that speeds up the initial build significantly)

@theimowski theimowski merged commit 98341b4 into SAFE-Stack:master Apr 23, 2018
@forki
Copy link
Copy Markdown
Member

forki commented Apr 24, 2018 via email

@theimowski
Copy link
Copy Markdown
Member

Yeah but then we'd have to check in the script if that's the first run or not, so for now it seems reasonable to just lock all js deps

@isaacabraham
Copy link
Copy Markdown
Member Author

@theimowski I'm not sure if you do. If you just call yarn install I don't think that it checks for newer versions etc.? Not sure though.

@forki
Copy link
Copy Markdown
Member

forki commented Apr 24, 2018

yarn upgrade --latest checks for latest.

@isaacabraham
Copy link
Copy Markdown
Member Author

@forki But yarn on it's own (or yarn install) doesn't?

@forki
Copy link
Copy Markdown
Member

forki commented Apr 24, 2018 via email

@isaacabraham
Copy link
Copy Markdown
Member Author

@forki do you mean it upgrades every single time, even if there's a valid lock file? If so then yes agreed we should stick with committed lock file and freeze.

@forki
Copy link
Copy Markdown
Member

forki commented Apr 24, 2018 via email

@isaacabraham isaacabraham deleted the yarn-lock branch April 24, 2018 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants