Skip to content

Commit e08f91d

Browse files
committed
Reorganize orphaned files from additional-details/ and javascript/
Moved to existing categories (7 files): - manual-installation-overview.md → advanced-topics/ - render-functions.md → core-concepts/ - server-rendering-tips.md → deployment/ - credits.md → misc/ - asset-pipeline.md → misc/ (warning guide) - api/README.md → api-reference/README.md - troubleshooting/README.md → deployment/troubleshooting.md Moved to outdated/ (4 files): - tips-for-usage-with-sp6.md (Shakapacker 6 legacy) - upgrade-webpacker-v3-to-v4.md (explicitly outdated) - converting-from-custom-webpack-config-to-rails-webpacker-config.md (webpacker legacy) - webpack.md (outdated Webpack v2 content) Merged and deleted (1 file): - node-dependencies-and-npm.md merged into updating-dependencies.md (combined yarn upgrade, yarn add, and ncu workflows) All orphaned files from Steps 1-8 now have homes!
1 parent 9964880 commit e08f91d

13 files changed

+48
-24
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/javascript/node-dependencies-and-npm.md

Lines changed: 0 additions & 20 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

docs/misc/updating-dependencies.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,25 @@ Delete any unwanted version constraints from your Gemfile and run:
1010
bundle update
1111
```
1212

13-
## NPM
13+
## Node/Yarn
14+
15+
### Checking for Outdated Packages
16+
17+
Check for outdated versions of packages:
18+
19+
```bash
20+
cd client
21+
yarn outdated
22+
```
23+
24+
Read CHANGELOGs of major updated packages before you update. You might not be ready for some updates.
25+
26+
### Updating All Dependencies
27+
28+
**Option 1: Using npm-check-updates (Recommended)**
1429

1530
1. Install [npm-check-updates](https://www.npmjs.com/package/npm-check-updates)
16-
1. Run `yarn outdated` and read CHANGELOGs of major updated packages before you update. You might not be ready for some updates.
17-
1. Run these commands. You may or may not need to `rm -rf` your `node_modules` directory.
31+
2. Run these commands. You may or may not need to `rm -rf` your `node_modules` directory.
1832

1933
```bash
2034
cd client
@@ -24,8 +38,38 @@ bundle update
2438

2539
Some combinations that I often run:
2640

27-
- remove old installed `node_modules` so you only get what corresponds to `package.json`:
41+
- Remove old installed `node_modules` so you only get what corresponds to `package.json`:
2842

2943
```bash
3044
ncu -u -a && rm -rf node_modules && yarn
3145
```
46+
47+
**Option 2: Using yarn upgrade**
48+
49+
To update all dependencies:
50+
51+
```bash
52+
cd client
53+
yarn upgrade
54+
```
55+
56+
To upgrade a specific package:
57+
58+
```bash
59+
yarn upgrade [package]
60+
```
61+
62+
### Adding New Dependencies
63+
64+
Typically, you can add your Node dependencies as you normally would:
65+
66+
```bash
67+
cd client
68+
yarn add module_name@version
69+
# or for dev dependencies
70+
yarn add --dev module_name@version
71+
```
72+
73+
### Verify After Updates
74+
75+
Confirm that the hot replacement dev server and the Rails server both work after updating dependencies.

0 commit comments

Comments
 (0)