Skip to content

Commit

Permalink
Update ctl-as-dependency.md
Browse files Browse the repository at this point in the history
  • Loading branch information
klntsky authored Jul 26, 2024
1 parent c027375 commit 26c4a25
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions doc/ctl-as-dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,12 @@ Make sure to perform **all** of the following steps, otherwise you **will** enco

3. **Update your JS dependencies**

- If CTL has added any JS dependencies, these will also need to be added to your own `package.json`
- Similarly, if any of CTL's JS dependencies have changed versions, you will need to use the **exact** same version in your own `package.json`
- That is, avoid using the `~` or `^` prefixes (e.g use versions like `"1.6.51"` instead of `"^1.6.51"`)
- If you're using a `package-lock.json` (which is _highly_ recommended), you can update the lockfile with `npm i --package-lock-only`
- The NPM dependencies your project has must have the exact same versions CTL's own `package.json` specifies.
- You have to update `package-lock.json` by running `npm install`. If you are in a nix shell and use our setup that symlinks `./node_modules`, npm will complain about inability to write to the filesystem, use `npm i --package-lock-only` to skip writing to `node_modules`. If your `node_modules` are managed by Nix, you will have to re-enter the shell for the changes to apply.

4. **Update your webpack/esbuild config**

- Sometimes the WebPack or esbuild configuration also comes with breaking changes. Use `git diff old-revision new-revision webpack.config.cjs` in the root of a cloned CTL repo, or use `git blame`.
- Sometimes WebPack or esbuild configurations also come with breaking changes. Refer to the CHANGELOG.

## See also

Expand Down

0 comments on commit 26c4a25

Please sign in to comment.