shakapacker 9.0.0.beta.8 → 9.0.0.beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.husky/pre-commit +2 -0
- data/CHANGELOG.md +119 -97
- data/Gemfile.lock +1 -1
- data/README.md +3 -2
- data/TODO_v9.md +5 -2
- data/conductor-setup.sh +12 -0
- data/docs/css-modules-export-mode.md +102 -8
- data/docs/v9_upgrade.md +131 -23
- data/lib/shakapacker/doctor.rb +94 -0
- data/lib/shakapacker/swc_migrator.rb +60 -2
- data/lib/shakapacker/version.rb +1 -1
- data/lib/shakapacker.rb +1 -1
- data/package/env.ts +25 -13
- data/package/utils/getStyleRule.ts +7 -2
- data/package.json +1 -1
- data/test/package/config.test.js +3 -0
- data/test/package/env.test.js +42 -7
- data/test/package/environments/base.test.js +4 -0
- data/test/package/staging.test.js +4 -3
- data/tools/README.md +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1157b2b32dc1e415593d4b3386abcdc6dc0e8d5b8863d34ca418c4e3333ca9f1
|
|
4
|
+
data.tar.gz: 83787074dfb2bce32284997b1312262e28b086ebc7e5bfcd11b647859268b842
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 888e0bbb28ede4eeea180a4a60885a49c073a6aec63f1f84db15c130624b7d8b79f903a66af640e996ddb7985ce022c781c6113dc1f274d4b6f60f59f6851733
|
|
7
|
+
data.tar.gz: 432465adefccd3610b99ec23b6551e89a9cc39e658b475f70664af1791587f574f2b4bcb2c833aa1dad7bc11ad06c9dff52f5892b3b914c5629a58f327e90d92
|
data/.husky/pre-commit
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -1,142 +1,95 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
- For the changelog of versions prior to v6, see the [5.x stable branch of rails/webpacker](https://github.com/rails/webpacker/tree/5-x-stable).
|
|
2
|
+
- **Please see the [v9 Upgrade Guide](./docs/v9_upgrade.md) for upgrading to version 9 and accounting for breaking changes.**
|
|
3
|
+
- Please see the [v8 Upgrade Guide](./docs/v8_upgrade.md) for upgrading to version 8 and accounting for breaking changes.
|
|
4
|
+
- Please see the [v7 Upgrade Guide](./docs/v7_upgrade.md) for upgrading to new spelling in version 7.
|
|
5
|
+
- Please see the [v6 Upgrade Guide](./docs/v6_upgrade.md) to go from versions prior to v6.
|
|
6
|
+
- [ShakaCode](https://www.shakacode.com) offers support for upgrading from Webpacker or using Shakapacker. If interested, contact Justin Gordon, [justin@shakacode.com](mailto:justin@shakacode.com).
|
|
7
7
|
|
|
8
8
|
# Versions
|
|
9
|
+
|
|
9
10
|
## [Unreleased]
|
|
11
|
+
|
|
10
12
|
Changes since the last non-beta release.
|
|
11
13
|
|
|
12
|
-
###
|
|
13
|
-
- **Phase 5 TypeScript Migration - Framework-Specific Modules** by [justin808](https://github.com/justin808)
|
|
14
|
-
- Converted framework-specific modules to TypeScript
|
|
15
|
-
- Migrated package/rspack/index.js to TypeScript
|
|
16
|
-
- Migrated package/swc/index.js to TypeScript
|
|
17
|
-
- Migrated package/esbuild/index.js to TypeScript
|
|
18
|
-
- Migrated package/babel/preset.js to TypeScript
|
|
19
|
-
- Added @types/babel__core for enhanced type safety
|
|
20
|
-
- All 130 tests passing
|
|
21
|
-
- **Phase 6 TypeScript Migration - Final Cleanup** (by [justin808](https://github.com/justin808))
|
|
22
|
-
- Added TypeScript ESLint support with @typescript-eslint/parser and @typescript-eslint/eslint-plugin
|
|
23
|
-
- Configured TypeScript-specific linting rules for improved code quality
|
|
24
|
-
- Verified strict mode is enabled in TypeScript configuration
|
|
25
|
-
- Enhanced developer experience with TypeScript linting across the entire codebase
|
|
26
|
-
|
|
27
|
-
## [v9.0.0-beta.7] - October 1, 2025
|
|
14
|
+
### Fixed
|
|
28
15
|
|
|
29
|
-
|
|
30
|
-
- **Phase 2 TypeScript Migration - Core Modules** ([PR 608](https://github.com/shakacode/shakapacker/pull/608) by [justin808](https://github.com/justin808))
|
|
31
|
-
- Converted core modules to TypeScript: config.ts, env.ts, and utilities
|
|
32
|
-
- Enhanced type safety across the codebase
|
|
33
|
-
- Better IDE support and autocomplete
|
|
34
|
-
- **Phase 3 TypeScript Migration - Environment Files** ([PR 614](https://github.com/shakacode/shakapacker/pull/614) by [justin808](https://github.com/justin808))
|
|
35
|
-
- Converted all environment configuration files to TypeScript (development, production, test)
|
|
36
|
-
- Added centralized type exports for consumer use (import from "shakapacker/types")
|
|
37
|
-
- Created shared TypeScript interfaces for environment configurations
|
|
38
|
-
- Introduced structured error codes for programmatic error handling
|
|
39
|
-
- Exported shared types: WebpackConfig, RspackConfig, EnvironmentConfig
|
|
40
|
-
- **Optional Peer Dependencies** ([PR 615](https://github.com/shakacode/shakapacker/pull/615) by [justin808](https://github.com/justin808))
|
|
41
|
-
- Restored peer dependencies as optional to improve package version tracking
|
|
42
|
-
- Added peerDependenciesMeta marking all peers as optional
|
|
43
|
-
- Moved webpack-merge to direct dependencies (required at runtime)
|
|
44
|
-
- Prevents installation warnings while maintaining upgrade visibility
|
|
45
|
-
- **Migration Tooling Improvements** ([PR 613](https://github.com/shakacode/shakapacker/pull/613) by [justin808](https://github.com/justin808))
|
|
46
|
-
- Added SWC migration helper: rake shakapacker:migrate:to_swc
|
|
47
|
-
- Enhanced error messages for missing dependencies
|
|
48
|
-
- Improved doctor command output
|
|
16
|
+
- Fixed NODE_ENV defaulting to production breaking dev server ([Issue 631](https://github.com/shakacode/shakapacker/issues/631)). NODE_ENV now defaults to development unless RAILS_ENV is explicitly set to production. This ensures the dev server works out of the box without requiring NODE_ENV to be set, and fixes incorrect port and 404 asset errors.
|
|
49
17
|
|
|
50
|
-
|
|
51
|
-
- **Path Validation Utilities** ([PR 614](https://github.com/shakacode/shakapacker/pull/614) by [justin808](https://github.com/justin808))
|
|
52
|
-
- Added validation to prevent directory traversal attacks
|
|
53
|
-
- Implemented environment variable sanitization to prevent injection
|
|
54
|
-
- Enforced strict port validation (reject strings with non-digits)
|
|
55
|
-
- Added SHAKAPACKER_NPM_PACKAGE path validation (only .tgz/.tar.gz allowed)
|
|
56
|
-
- Path traversal security checks now run regardless of validation mode
|
|
18
|
+
## [v9.0.0-beta.8] - October 3, 2025
|
|
57
19
|
|
|
58
|
-
|
|
59
|
-
- **Build Process Improvements** ([PR 614](https://github.com/shakacode/shakapacker/pull/614) by [justin808](https://github.com/justin808))
|
|
60
|
-
- Environment JS files now generated during npm publish (not committed to git)
|
|
61
|
-
- Prevents TypeScript source and compiled JS from getting out of sync
|
|
62
|
-
- Auto-format compiled JavaScript during build process
|
|
63
|
-
- Enhanced .npmignore to exclude TypeScript sources, include compiled JS
|
|
64
|
-
|
|
65
|
-
### Performance
|
|
66
|
-
- **Validation Caching** ([PR 614](https://github.com/shakacode/shakapacker/pull/614) by [justin808](https://github.com/justin808))
|
|
67
|
-
- Implemented TTL-based validation caching (5s watch, 1min dev, infinite prod)
|
|
68
|
-
- Made cache TTL configurable via SHAKAPACKER_CACHE_TTL environment variable
|
|
69
|
-
- Lazy-loaded and cached watch mode detection
|
|
70
|
-
|
|
71
|
-
### Fixed
|
|
72
|
-
- Fixed clearValidationCache() to actually clear the cache ([PR 614](https://github.com/shakacode/shakapacker/pull/614) by [justin808](https://github.com/justin808))
|
|
73
|
-
- Fixed private_output_path configuration edge cases ([PR 604](https://github.com/shakacode/shakapacker/pull/604) by [justin808](https://github.com/justin808))
|
|
74
|
-
|
|
75
|
-
## [v9.0.0-beta.4] - September 15, 2025
|
|
20
|
+
See the [v9 Upgrade Guide](https://github.com/shakacode/shakapacker/blob/main/docs/v9_upgrade.md) for detailed migration instructions.
|
|
76
21
|
|
|
77
22
|
### ⚠️ Breaking Changes
|
|
78
23
|
|
|
79
24
|
1. **SWC is now the default JavaScript transpiler instead of Babel** ([PR 603](https://github.com/shakacode/shakapacker/pull/603) by [justin808](https://github.com/justin808))
|
|
25
|
+
|
|
80
26
|
- Babel dependencies are no longer included as peer dependencies
|
|
81
27
|
- Improves compilation speed by 20x
|
|
82
28
|
- **Migration for existing projects:**
|
|
83
|
-
- **Option 1 (Recommended):** Switch to SWC:
|
|
29
|
+
- **Option 1 (Recommended):** Switch to SWC - Run `rake shakapacker:migrate:to_swc` or manually:
|
|
84
30
|
```yaml
|
|
85
31
|
# config/shakapacker.yml
|
|
86
|
-
javascript_transpiler:
|
|
32
|
+
javascript_transpiler: "swc"
|
|
87
33
|
```
|
|
88
34
|
Then install: `npm install @swc/core swc-loader`
|
|
89
35
|
- **Option 2:** Keep using Babel:
|
|
90
36
|
```yaml
|
|
91
37
|
# config/shakapacker.yml
|
|
92
|
-
javascript_transpiler:
|
|
38
|
+
javascript_transpiler: "babel"
|
|
93
39
|
```
|
|
94
40
|
|
|
95
41
|
2. **CSS Modules now use named exports by default**
|
|
96
|
-
|
|
42
|
+
|
|
97
43
|
- **JavaScript:** Use named imports: `import { className } from './styles.module.css'`
|
|
98
44
|
- **TypeScript:** Use namespace imports: `import * as styles from './styles.module.css'`
|
|
99
|
-
-
|
|
100
|
-
- See [CSS Modules Export Mode documentation](./docs/css-modules-export-mode.md) for migration details
|
|
45
|
+
- To keep the old behavior with default imports, see [CSS Modules Export Mode documentation](./docs/css-modules-export-mode.md) for configuration instructions
|
|
101
46
|
|
|
102
47
|
3. **Configuration option renamed from `webpack_loader` to `javascript_transpiler`**
|
|
103
48
|
- Better reflects its purpose of configuring JavaScript transpilation
|
|
104
49
|
- Old `webpack_loader` option deprecated but still supported with warning
|
|
105
50
|
|
|
106
51
|
### Added
|
|
52
|
+
|
|
107
53
|
- **Rspack support** as an alternative assets bundler to webpack
|
|
108
54
|
- Configure `assets_bundler: 'rspack'` in `shakapacker.yml`
|
|
109
55
|
- Faster Rust-based bundling with webpack-compatible APIs
|
|
110
56
|
- Built-in SWC loader and CSS extraction
|
|
111
57
|
- Automatic bundler detection in `bin/shakapacker`
|
|
112
|
-
- **
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
- Detects transpiler-specific issues based on v9 changes
|
|
58
|
+
- **TypeScript type definitions** for improved IDE support and autocomplete
|
|
59
|
+
- Types available via `import type { WebpackConfig, RspackConfig, EnvironmentConfig } from "shakapacker/types"`
|
|
60
|
+
- See [TypeScript Documentation](./docs/typescript.md) for migration and usage instructions
|
|
61
|
+
- **Optional peer dependencies** - All peer dependencies now marked as optional, preventing installation warnings while maintaining version compatibility tracking
|
|
62
|
+
- **Private output path** for server-side rendering bundles ([PR 592](https://github.com/shakacode/shakapacker/pull/592))
|
|
63
|
+
- Configure `private_output_path` for private server bundles separate from public assets
|
|
64
|
+
- **`rake shakapacker:doctor` diagnostic command** to check for configuration issues and missing dependencies
|
|
65
|
+
- **`rake shakapacker:migrate:to_swc`** migration helper to assist with switching from Babel to SWC
|
|
121
66
|
|
|
122
|
-
###
|
|
123
|
-
|
|
124
|
-
- **
|
|
125
|
-
-
|
|
67
|
+
### Security
|
|
68
|
+
|
|
69
|
+
- **Path Validation Utilities** ([PR 614](https://github.com/shakacode/shakapacker/pull/614) by [justin808](https://github.com/justin808))
|
|
70
|
+
- Added validation to prevent directory traversal attacks
|
|
71
|
+
- Implemented environment variable sanitization to prevent injection
|
|
72
|
+
- Enforced strict port validation (reject strings with non-digits)
|
|
73
|
+
- Added SHAKAPACKER_NPM_PACKAGE path validation (only .tgz/.tar.gz allowed)
|
|
74
|
+
- Path traversal security checks now run regardless of validation mode
|
|
126
75
|
|
|
127
76
|
### Fixed
|
|
128
|
-
|
|
77
|
+
|
|
78
|
+
- Fixed private_output_path configuration edge cases ([PR 604](https://github.com/shakacode/shakapacker/pull/604))
|
|
79
|
+
- Updated webpack-dev-server to secure versions (^4.15.2 || ^5.2.2) ([PR 585](https://github.com/shakacode/shakapacker/pull/585))
|
|
129
80
|
|
|
130
81
|
## [v8.4.0] - September 8, 2024
|
|
131
82
|
|
|
132
83
|
### Added
|
|
84
|
+
|
|
133
85
|
- Support for subresource integrity. [PR 570](https://github.com/shakacode/shakapacker/pull/570) by [panagiotisplytas](https://github.com/panagiotisplytas).
|
|
134
86
|
|
|
135
87
|
### Fixed
|
|
136
|
-
- Install the latest major version of peer dependencies [PR 576](https://github.com/shakacode/shakapacker/pull/576) by [G-Rath](https://github.com/g-rath).
|
|
137
88
|
|
|
89
|
+
- Install the latest major version of peer dependencies [PR 576](https://github.com/shakacode/shakapacker/pull/576) by [G-Rath](https://github.com/g-rath).
|
|
138
90
|
|
|
139
91
|
## [v8.3.0] - April 28, 2024
|
|
92
|
+
|
|
140
93
|
### Added
|
|
141
94
|
|
|
142
95
|
- Allow `webpack-assets-manifest` v6. [PR 562](https://github.com/shakacode/shakapacker/pull/562) by [tagliala](https://github.com/tagliala), [shoeyn](https://github.com/shoeyn).
|
|
@@ -151,6 +104,7 @@ Changes since the last non-beta release.
|
|
|
151
104
|
- More precise types for `devServer` and `rules` in the configuration. [PR 555](https://github.com/shakacode/shakapacker/pull/555) by [alexeyr-ci2](https://github.com/alexeyr-ci2).
|
|
152
105
|
|
|
153
106
|
## [v8.2.0] - March 12, 2025
|
|
107
|
+
|
|
154
108
|
### Added
|
|
155
109
|
|
|
156
110
|
- Support for `async` attribute in `javascript_pack_tag`, `append_javascript_pack_tag`, and `prepend_javascript_pack_tag`. [PR 554](https://github.com/shakacode/shakapacker/pull/554) by [AbanoubGhadban](https://github.com/abanoubghadban).
|
|
@@ -163,21 +117,25 @@ Changes since the last non-beta release.
|
|
|
163
117
|
- Allow `webpack-cli` v6. [PR 533](https://github.com/shakacode/shakapacker/pull/533) by [tagliala](https://github.com/tagliala).
|
|
164
118
|
|
|
165
119
|
### Changed
|
|
120
|
+
|
|
166
121
|
- Changed internal `require`s to `require_relative` to make code less dependent on the load path. [PR 516](https://github.com/shakacode/shakapacker/pull/516) by [tagliala](https://github.com/tagliala).
|
|
167
122
|
- Allow configuring webpack from a Typescript file (`config/webpack/webpack.config.ts`). [PR 524](https://github.com/shakacode/shakapacker/pull/524) by [jdelStrother](https://github.com/jdelStrother).
|
|
168
123
|
|
|
169
124
|
### Fixed
|
|
125
|
+
|
|
170
126
|
- Fix error when rails environment is required from outside the rails root directory [PR 520](https://github.com/shakacode/shakapacker/pull/520)
|
|
171
127
|
|
|
172
128
|
## [v8.0.2] - August 28, 2024
|
|
173
129
|
|
|
174
130
|
### Fixed
|
|
131
|
+
|
|
175
132
|
- Fix wrong instruction in esbuild loader documentation [PR 504](https://github.com/shakacode/shakapacker/pull/504) by [adriangohjw](https://github.com/adriangohjw).
|
|
176
133
|
- Add logic to sass rule conditional on sass-loader version [PR 508](https://github.com/shakacode/shakapacker/pull/508) by [Judahmeek](https://github.com/Judahmeek).
|
|
177
134
|
|
|
178
135
|
## [v8.0.1] - July 10, 2024
|
|
179
136
|
|
|
180
137
|
### Changed
|
|
138
|
+
|
|
181
139
|
- Update outdated GitHub Actions to use Node.js 20.0 versions instead [PR 497](https://github.com/shakacode/shakapacker/pull/497) by [adriangohjw](https://github.com/adriangohjw).
|
|
182
140
|
- Allow `webpack-merge` v6 to be used [PR 502](https://github.com/shakacode/shakapacker/pull/502) by [G-Rath](https://github.com/g-rath).
|
|
183
141
|
|
|
@@ -238,71 +196,89 @@ See the [v8 Upgrade Guide](https://github.com/shakacode/shakapacker/blob/main/do
|
|
|
238
196
|
|
|
239
197
|
- Remove `isArray` utility (just use `Array.isArray` directly) and renamed a few files [PR 454](https://github.com/shakacode/shakapacker/pull/454) by [G-Rath](https://github.com/g-rath).
|
|
240
198
|
|
|
241
|
-
- Make JavaScript test helper utilities internal (`chdirTestApp`, `chdirCwd`, `resetEnv`)
|
|
199
|
+
- Make JavaScript test helper utilities internal (`chdirTestApp`, `chdirCwd`, `resetEnv`) [PR 458](https://github.com/shakacode/shakapacker/pull/458) by [G-Rath](https://github.com/g-rath).
|
|
242
200
|
|
|
243
201
|
## [v7.2.3] - March 23, 2024
|
|
244
202
|
|
|
245
203
|
### Added
|
|
204
|
+
|
|
246
205
|
- Emit warnings instead of errors when compilation is success but stderr is not empty. [PR 416](https://github.com/shakacode/shakapacker/pull/416) by [n-rodriguez](https://github.com/n-rodriguez).
|
|
247
206
|
- Allow `webpack-dev-server` v5. [PR 418](https://github.com/shakacode/shakapacker/pull/418) by [G-Rath](https://github.com/g-rath)
|
|
248
207
|
|
|
249
208
|
### Removed
|
|
209
|
+
|
|
250
210
|
- Removes dependency on `glob` library. [PR 435](https://github.com/shakacode/shakapacker/pull/435) by [tomdracz](https://github.com/tomdracz).
|
|
251
211
|
|
|
252
212
|
### Fixed
|
|
213
|
+
|
|
253
214
|
- Uses config file passed in `SHAKAPACKER_CONFIG` consistently.[PR 448](https://github.com/shakacode/shakapacker/pull/448) by [tomdracz](https://github.com/tomdracz).
|
|
254
215
|
|
|
255
|
-
|
|
216
|
+
Previously this could have been ignored in few code branches, especially when checking for available environments.
|
|
256
217
|
|
|
257
218
|
## [v7.2.2] - January 19, 2024
|
|
258
219
|
|
|
259
220
|
### Added
|
|
221
|
+
|
|
260
222
|
- Allow `compression-webpack-plugin` v11. [PR 406](https://github.com/shakacode/shakapacker/pull/406) by [tagliala](https://github.com/tagliala).
|
|
261
223
|
|
|
262
224
|
## [v7.2.1] - December 30, 2023
|
|
263
225
|
|
|
264
226
|
### Fixed
|
|
227
|
+
|
|
265
228
|
- Show deprecation message for `relative_url_root` only if it is set. [PR 400](https://github.com/shakacode/shakapacker/pull/400) by [ahangarha](https://github.com/ahangarha).
|
|
266
229
|
|
|
267
230
|
## [v7.2.0] - December 28, 2023
|
|
268
231
|
|
|
269
232
|
### Added
|
|
233
|
+
|
|
270
234
|
- Experimental support for other JS package managers using `package_json` gem [PR 349](https://github.com/shakacode/shakapacker/pull/349) by [G-Rath](https://github.com/g-rath).
|
|
271
235
|
- Support `hmr: only` configuration [PR 378](https://github.com/shakacode/shakapacker/pull/378) by [SimenB](https://github.com/SimenB).
|
|
272
236
|
- Use `config/shakapacker.yml` as the secondary source for `asset_host` and `relative_url_root` configurations [PR 376](https://github.com/shakacode/shakapacker/pull/376) by [ahangarha](https://github.com/ahangarha).
|
|
273
237
|
|
|
274
238
|
### Fixed
|
|
239
|
+
|
|
275
240
|
- Recommend `server` option instead of the deprecated `https` option when `--https` is provided [PR 380](https://github.com/shakacode/shakapacker/pull/380) by [G-Rath](https://github.com/g-rath)
|
|
276
241
|
- Recompile assets on asset host change [PR 364](https://github.com/shakacode/shakapacker/pull/364) by [ahangarha](https://github.com/ahangarha).
|
|
277
242
|
- Add deprecation warning for `https` option in `shakapacker.yml` (use `server: 'https'` instead) [PR 382](https://github.com/shakacode/shakapacker/pull/382) by [G-Rath](https://github.com/g-rath).
|
|
278
243
|
- Disable Hot Module Replacement in `webpack-dev-server` when `hmr: false` [PR 392](https://github.com/shakacode/shakapacker/pull/392) by [thedanbob](https://github.com/thedanbob).
|
|
279
244
|
|
|
280
245
|
### Deprecated
|
|
246
|
+
|
|
281
247
|
- The usage of `relative_url_root` is deprecated in Shakapacker and will be removed in v8. [PR 376](https://github.com/shakacode/shakapacker/pull/376) by [ahangarha](https://github.com/ahangarha).
|
|
282
248
|
|
|
283
249
|
## [v7.1.0] - September 30, 2023
|
|
284
250
|
|
|
285
251
|
### Added
|
|
252
|
+
|
|
286
253
|
- Support passing custom webpack config directly to `generateWebpackConfig` for merging [PR 343](https://github.com/shakacode/shakapacker/pull/343) by [G-Rath](https://github.com/g-rath).
|
|
287
254
|
|
|
288
255
|
### Fixed
|
|
256
|
+
|
|
289
257
|
- Use `NODE_OPTIONS` to enable Node-specific debugging flags [PR 350](https://github.com/shakacode/shakapacker/pull/350).
|
|
290
258
|
- Add the boilerplate `application.js` into `packs/` [PR 363](https://github.com/shakacode/shakapacker/pull/363).
|
|
291
259
|
|
|
292
260
|
## [v7.0.3] - July 7, 2023
|
|
261
|
+
|
|
293
262
|
### Fixed
|
|
263
|
+
|
|
294
264
|
- Fixed commands execution for projects with space in the absolute path [PR 322](https://github.com/shakacode/shakapacker/pull/322) by [kukicola](https://github.com/kukicola).
|
|
295
265
|
|
|
296
266
|
## [v7.0.2] - July 3, 2023
|
|
267
|
+
|
|
297
268
|
### Fixed
|
|
269
|
+
|
|
298
270
|
- Fixed creation of assets:precompile if it is missing [PR 325](https://github.com/shakacode/shakapacker/pull/325) by [ahangarha](https://github.com/ahangarha).
|
|
299
271
|
|
|
300
272
|
## [v7.0.1] - June 27, 2023
|
|
273
|
+
|
|
301
274
|
### Fixed
|
|
275
|
+
|
|
302
276
|
- Fixed the condition for showing warning for setting `useContentHash` to `false` in the production environment. [PR 320](https://github.com/shakacode/shakapacker/pull/320) by [ahangarha](https://github.com/ahangarha).
|
|
303
277
|
|
|
304
278
|
## [v7.0.0] - June 23, 2023
|
|
279
|
+
|
|
305
280
|
### Breaking changes
|
|
281
|
+
|
|
306
282
|
- Removes defaults passed to `@babel/preset-typescript`. [PR 273](https://github.com/shakacode/shakapacker/pull/273) by [tomdracz](https://github.com/tomdracz).
|
|
307
283
|
|
|
308
284
|
`@babel/preset-typescript` has been initialised in default configuration with `{ allExtensions: true, isTSX: true }` - meaning every file in the codebase was treated as TSX leading to potential issues. This has been removed and returns to sensible default of the preset which is to figure out the file type from the extensions. This change might affect generated output however so it is marked as breaking.
|
|
@@ -312,18 +288,21 @@ See the [v8 Upgrade Guide](https://github.com/shakacode/shakapacker/blob/main/do
|
|
|
312
288
|
The `webpackConfig` property in the `shakapacker` module has been updated to be a function instead of a global mutable webpack configuration. This function now returns an immutable webpack configuration object, which ensures that any modifications made to it will not affect any other usage of the webpack configuration. If a project still requires the old mutable object, it can be accessed by replacing `webpackConfig` with `globalMutableWebpackConfig`. Check [v7-upgrade](https://github.com/shakacode/shakapacker/blob/main/docs/v7_upgrade.md) documentation for more detail.
|
|
313
289
|
|
|
314
290
|
### Added
|
|
291
|
+
|
|
315
292
|
- Set CSS modules mode depending on file type. [PR 261](https://github.com/shakacode/shakapacker/pull/261) by [talyuk](https://github.com/talyuk).
|
|
316
293
|
- All standard webpack entries with the camelCase format are now supported in `shakapacker.yml` in snake_case format. [PR276](https://github.com/shakacode/shakapacker/pull/276) by [ahangarha](https://github.com/ahangarha).
|
|
317
294
|
- The `shakapacker:install` rake task now has an option to force overriding files using `FORCE=true` environment variable [PR311](https://github.com/shakacode/shakapacker/pull/311) by [ahangarha](https://github.com/ahangarha).
|
|
318
295
|
- Allow configuration of use of contentHash for specific environment [PR 234](https://github.com/shakacode/shakapacker/pull/234) by [justin808](https://github/justin808).
|
|
319
296
|
|
|
320
297
|
### Changed
|
|
298
|
+
|
|
321
299
|
- Rename Webpacker to Shakapacker in the entire project including config files, binstubs, environment variables, etc. with a high degree of backward compatibility.
|
|
322
300
|
|
|
323
301
|
This change might be breaking for certain setups and edge cases. More information: [v7 Upgrade Guide](./docs/v7_upgrade.md) [PR157](https://github.com/shakacode/shakapacker/pull/157) by [ahangarha](https://github.com/ahangarha)
|
|
324
302
|
|
|
325
303
|
- Set `source_entry_path` to `packs` and `nested_entries` to `true` in`shakapacker.yml` [PR 284](https://github.com/shakacode/shakapacker/pull/284) by [ahangarha](https://github.com/ahangarha).
|
|
326
304
|
- Dev server configuration is modified to follow [webpack recommended configurations](https://webpack.js.org/configuration/dev-server/) for dev server. [PR276](https://github.com/shakacode/shakapacker/pull/276) by [ahangarha](https://github.com/ahangarha):
|
|
305
|
+
|
|
327
306
|
- Deprecated `https` entry is removed from the default configuration file, allowing to set `server` or `https` as per the project requirements. For more detail, check webpack documentation. The `https` entry can be effective only if there is no `server` entry in the config file.
|
|
328
307
|
- `allowed_hosts` is now set to `auto` instead of `all` by default.
|
|
329
308
|
|
|
@@ -334,6 +313,7 @@ See the [v8 Upgrade Guide](https://github.com/shakacode/shakapacker/blob/main/do
|
|
|
334
313
|
Going forward, the top level directory of static files will be retained so this will necessitate the update of file name references in asset helpers. In the example above, the file sourced from `app/javascript/images/image.png` will be now output to `static/images/image.png` and needs to be referenced as `image_pack_tag("images/image.jpg")` or `image_pack_tag("static/images/image.jpg")`.
|
|
335
314
|
|
|
336
315
|
### Fixed
|
|
316
|
+
|
|
337
317
|
- Move compilation lock file into the working directory. [PR 272](https://github.com/shakacode/shakapacker/pull/272) by [tomdracz](https://github.com/tomdracz).
|
|
338
318
|
- Process `source_entry_path` with values starting with `/` as a relative path to `source_path` [PR 284](https://github.com/shakacode/shakapacker/pull/284) by [ahangarha](https://github.com/ahangarha).
|
|
339
319
|
- Removes defaults passed to `@babel/preset-typescript` to make it possible to have projects with mix of JS and TS code [PR 273](https://github.com/shakacode/shakapacker/pull/273) by [tomdracz](https://github.com/tomdracz).
|
|
@@ -342,16 +322,22 @@ See the [v8 Upgrade Guide](https://github.com/shakacode/shakapacker/blob/main/do
|
|
|
342
322
|
|
|
343
323
|
- Fixed RC version detection during installation. [PR312](https://github.com/shakacode/shakapacker/pull/312) by [ahangarha](https://github.com/ahangarha)
|
|
344
324
|
- Fix addition of webpack-dev-server to devDependencies during installation. [PR310](https://github.com/shakacode/shakapacker/pull/310) by [ahangarha](https://github.com/ahangarha)
|
|
325
|
+
|
|
345
326
|
### Removed
|
|
327
|
+
|
|
346
328
|
- Remove redundant enhancement for precompile task to run `yarn install` [PR 270](https://github.com/shakacode/shakapacker/pull/270) by [ahangarha](https://github.com/ahangarha).
|
|
347
329
|
- Remove deprecated `check_yarn_integrity` from `Shakapacker::Configuration` [PR SP288](https://github.com/shakacode/shakapacker/pull/288) by [ahangarha](https://github.com/ahangarha).
|
|
348
330
|
|
|
349
331
|
## [v6.6.0] - March 7, 2023
|
|
332
|
+
|
|
350
333
|
### Improved
|
|
334
|
+
|
|
351
335
|
- Allow configuration of webpacker.yml through env variable. [PR 254](https://github.com/shakacode/shakapacker/pull/254) by [alecslupu](https://github.com/alecslupu).
|
|
352
336
|
|
|
353
337
|
## [v6.5.6] - February 11, 2023
|
|
338
|
+
|
|
354
339
|
### Fixed
|
|
340
|
+
|
|
355
341
|
- Fixed failing to update `bin/setup` file due to different formats of the file in different versions of Rails. [PR 229](https://github.com/shakacode/shakapacker/pull/229) by [ahangarha](https://github.com/ahangarha).
|
|
356
342
|
|
|
357
343
|
- Upgrade several JS dependencies to fix security issues. [PR 243](https://github.com/shakacode/shakapacker/pull/243) by [ahangarha](https://github.com/ahangarha).
|
|
@@ -365,27 +351,33 @@ See the [v8 Upgrade Guide](https://github.com/shakacode/shakapacker/blob/main/do
|
|
|
365
351
|
## [v6.5.5] - December 28, 2022
|
|
366
352
|
|
|
367
353
|
### Improved
|
|
354
|
+
|
|
368
355
|
- Describe keys different from `webpack-dev-server` in generated `webpacker.yml`. [PR 194](https://github.com/shakacode/shakapacker/pull/194) by [alexeyr](https://github.com/alexeyr).
|
|
369
356
|
- Allow webpack-cli v5 [PR 216](https://github.com/shakacode/shakapacker/pull/216) by [tagliala](https://github.com/tagliala).
|
|
370
357
|
- Allow babel-loader v9 [PR 215](https://github.com/shakacode/shakapacker/pull/215) by [tagliala](https://github.com/tagliala).
|
|
371
358
|
|
|
372
359
|
## [v6.5.4] - November 4, 2022
|
|
360
|
+
|
|
373
361
|
### Fixed
|
|
362
|
+
|
|
374
363
|
- Fixed regression caused by 6.5.3. PR #192 introduce extra split() call. [PR 202](https://github.com/shakacode/shakapacker/pull/202) by [Eric-Guo](https://github.com/Eric-Guo).
|
|
375
364
|
|
|
376
365
|
## [v6.5.3] - November 1, 2022
|
|
377
366
|
|
|
378
367
|
### Improved
|
|
368
|
+
|
|
379
369
|
- Set RAILS_ENV and BUNDLE_GEMFILE env values before requiring `bundler/setup`, `webpacker`, and `webpacker/webpack_runner`. [PR 190](https://github.com/shakacode/shakapacker/pull/190) by [betmenslido](https://github.com/betmenslido).
|
|
380
370
|
- The `mini-css-extract-plugin` may cause various warnings indicating CSS order conflicts when using a [File-System-based automated bundle generation feature](https://www.shakacode.com/react-on-rails/docs/guides/file-system-based-automated-bundle-generation/).
|
|
381
|
-
CSS order warnings can be disabled in projects where CSS ordering has been mitigated by consistent use of scoping or naming conventions. Added `css_extract_ignore_order_warnings` flag to webpacker configuration to disable the order warnings by [pulkitkkr](https://github.com/shakacode/shakapacker/pull/185) in [PR 192](https://github.com/shakacode/shakapacker/pull/192).
|
|
371
|
+
CSS order warnings can be disabled in projects where CSS ordering has been mitigated by consistent use of scoping or naming conventions. Added `css_extract_ignore_order_warnings` flag to webpacker configuration to disable the order warnings by [pulkitkkr](https://github.com/shakacode/shakapacker/pull/185) in [PR 192](https://github.com/shakacode/shakapacker/pull/192).
|
|
382
372
|
|
|
383
373
|
## [v6.5.2] - September 8, 2022
|
|
384
374
|
|
|
385
375
|
### Upgrade
|
|
376
|
+
|
|
386
377
|
Remove the setting of the NODE_ENV in your `bin/webpacker` and `bin/webpacker-dev-server` files per [PR 185](https://github.com/shakacode/shakapacker/pull/185).
|
|
387
378
|
|
|
388
379
|
### Fixed
|
|
380
|
+
|
|
389
381
|
- Changed NODE_ENV defaults to the following and moved from binstubs to the runner. [PR 185](https://github.com/shakacode/shakapacker/pull/185) by [mage1711](https://github.com/mage1711).
|
|
390
382
|
|
|
391
383
|
```
|
|
@@ -395,23 +387,30 @@ ENV["NODE_ENV"] ||= (ENV["RAILS_ENV"] == "production") ? "production" : "develop
|
|
|
395
387
|
## [v6.5.1] - August 15, 2022
|
|
396
388
|
|
|
397
389
|
### Improved
|
|
390
|
+
|
|
398
391
|
- Resolve exact npm package version from lockfiles for constraint checking. [PR 170](https://github.com/shakacode/shakapacker/pull/170) by [G-Rath](https://github.com/G-Rath).
|
|
399
392
|
|
|
400
393
|
### Fixed
|
|
394
|
+
|
|
401
395
|
- `append_javascript_pack_tag` and `append_stylesheet_pack_tag` helpers return `nil` to prevent rendering the queue into view when using `<%= … %>` ERB syntax. [PR 167](https://github.com/shakacode/shakapacker/pull/167) by [ur5us](https://github.com/ur5us). While `<%=` should not be used, it's OK to return nil in case it's misused.
|
|
402
396
|
- Fixed non-runnable test due to wrong code nesting. [PR 173](https://github.com/shakacode/shakapacker/pull/173) by [ur5us](https://github.com/ur5us).
|
|
403
397
|
- Fixed default configurations not working for custom Rails environments [PR 168](https://github.com/shakacode/shakapacker/pull/168) by [ur5us](https://github.com/ur5us).
|
|
404
398
|
- Added accessor method for `nested_entries` configuration. [PR 176](https://github.com/shakacode/shakapacker/pull/176) by [pulkitkkr](https://github.com/pulkitkkr).
|
|
405
399
|
|
|
406
400
|
## [v6.5.0] - July 4, 2022
|
|
401
|
+
|
|
407
402
|
### Added
|
|
403
|
+
|
|
408
404
|
- `append_stylesheet_pack_tag` helper. It helps in configuring stylesheet pack names from the view for a route or partials. It is also required for filesystem-based automated Component Registry API on React on Rails gem. [PR 144](https://github.com/shakacode/shakapacker/pull/144) by [pulkitkkr](https://github.com/pulkitkkr).
|
|
409
405
|
|
|
410
406
|
### Improved
|
|
407
|
+
|
|
411
408
|
- Make sure at most one compilation runs at a time [PR 139](https://github.com/shakacode/shakapacker/pull/139) by [artemave](https://github.com/artemave)
|
|
412
409
|
|
|
413
410
|
## [v6.4.1] - June 5, 2022
|
|
411
|
+
|
|
414
412
|
### Fixed
|
|
413
|
+
|
|
415
414
|
- Restores automatic installation of yarn packages removed in [#131](https://github.com/shakacode/shakapacker/pull/131), with added deprecation notice. [PR 140](https://github.com/shakacode/shakapacker/pull/140) by [tomdracz](https://github.com/tomdracz).
|
|
416
415
|
|
|
417
416
|
This will be again removed in Shakapacker v7 so you need to ensure you are installing yarn packages explicitly before the asset compilation, rather than relying on this behaviour through `asset:precompile` task (e.g. Capistrano deployment).
|
|
@@ -419,13 +418,17 @@ ENV["NODE_ENV"] ||= (ENV["RAILS_ENV"] == "production") ? "production" : "develop
|
|
|
419
418
|
- Disable Spring being used by `rails-erb-loader`. [PR 141](https://github.com/shakacode/shakapacker/pull/141) by [tomdracz](https://github.com/tomdracz).
|
|
420
419
|
|
|
421
420
|
## [v6.4.0] - June 2, 2022
|
|
421
|
+
|
|
422
422
|
### Fixed
|
|
423
|
+
|
|
423
424
|
- Fixed [Issue 123: Rails 7.0.3 - Webpacker configuration file not found when running rails webpacker:install (shakapacker v6.3)](https://github.com/shakacode/shakapacker/issues/123) in [PR 136: Don't enhance precompile if no config #136](https://github.com/shakacode/shakapacker/pull/136) by [justin808](https://github.com/justin808).
|
|
424
425
|
|
|
425
426
|
### Added
|
|
427
|
+
|
|
426
428
|
- Configuration boolean option `nested_entries` to use nested entries. This was the default prior to v6.0. Because entries maybe generated, it's useful to allow a `generated` subdirectory. [PR 121](https://github.com/shakacode/shakapacker/pull/121) by [justin808](https://github.com/justin808).
|
|
427
429
|
|
|
428
430
|
### Improved
|
|
431
|
+
|
|
429
432
|
- Allow v10 of `compression-webpack-plugin` as a peer dependency. [PR 117](https://github.com/shakacode/shakapacker/pull/117) by [aried3r](https://github.com/aried3r).
|
|
430
433
|
|
|
431
434
|
- [Remove assets:precompile task enhancement #131](https://github.com/shakacode/shakapacker/pull/131) by [James Herdman](https://github.com/jherdman): Removed the `yarn:install` Rake task, and no longer enhance `assets:precompile` with said task. These tasks were used to ensure required NPM packages were installed before asset precompilation. Going forward you will need to ensure these packages are already installed yourself. Should you wish to restore this behaviour you'll need to [reimplement the task](https://github.com/shakacode/shakapacker/blob/bee661422f2c902aa8ac9cf8fa1f7ccb8142c914/lib/tasks/yarn.rake) in your own application.
|
|
@@ -433,9 +436,11 @@ ENV["NODE_ENV"] ||= (ENV["RAILS_ENV"] == "production") ? "production" : "develop
|
|
|
433
436
|
## [v6.3.0] - May 19, 2022
|
|
434
437
|
|
|
435
438
|
### Improved
|
|
439
|
+
|
|
436
440
|
- Add ability to configure usage of either last modified timestamp and digest strategies when checking asset freshness. [PR 112](https://github.com/shakacode/shakapacker/pull/112) by [tomdracz](https://github.com/tomdracz).
|
|
437
441
|
|
|
438
442
|
### Fixed
|
|
443
|
+
|
|
439
444
|
- On Windows CSS urls no longer contain backslashes resulting in 404 errors. [PR 115](https://github.com/shakacode/shakapacker/pull/115) by [daniel-rikowski](https://github.com/daniel-rikowski).
|
|
440
445
|
|
|
441
446
|
## [v6.3.0-rc.1] - April 24, 2022
|
|
@@ -443,6 +448,7 @@ ENV["NODE_ENV"] ||= (ENV["RAILS_ENV"] == "production") ? "production" : "develop
|
|
|
443
448
|
Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions/6.3.0.pre.rc.1) and [NPM is 6.3.0-rc.1](https://www.npmjs.com/package/shakapacker/v/6.3.0-rc.1).
|
|
444
449
|
|
|
445
450
|
### Changed
|
|
451
|
+
|
|
446
452
|
- Remove Loose mode from the default @babel-preset/env configuration. [PR 107](https://github.com/shakacode/shakapacker/pull/107) by [Jeremy Liberman](https://github.com/MrLeebo).
|
|
447
453
|
|
|
448
454
|
Loose mode compiles the bundle down to be compatible with ES5, but saves space by skipping over behaviors that are considered edge cases. Loose mode can affect how your code runs in a variety of ways, but in newer versions of Babel it's better to use [Compiler Assumptions](https://babeljs.io/docs/en/assumptions) to have finer-grained control over which edge cases you're choosing to ignore.
|
|
@@ -450,10 +456,12 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
|
|
|
450
456
|
This change may increase the file size of your bundles, and may change some behavior in your app if your code touches upon one of the edge cases where Loose mode differs from native JavaScript. There are notes in the linked PR about how to turn Loose mode back on if you need to, but consider migrating to Compiler Assumptions when you can. If you have already customized your babel config, this change probably won't affect you.
|
|
451
457
|
|
|
452
458
|
### Added
|
|
459
|
+
|
|
453
460
|
- Adds `webpacker_precompile` setting to `webpacker.yml` to allow controlling precompile behaviour, similar to existing `ENV["WEBPACKER_PRECOMPILE"]` variable. [PR 102](https://github.com/shakacode/shakapacker/pull/102) by [Judahmeek](https://github.com/Judahmeek).
|
|
454
461
|
- Adds `append_javascript_pack_tag` helper. Allows for easier usage and coordination of multiple javascript packs. [PR 94](https://github.com/shakacode/shakapacker/pull/94) by [tomdracz](https://github.com/tomdracz).
|
|
455
462
|
|
|
456
463
|
### Improved
|
|
464
|
+
|
|
457
465
|
- Use last modified timestamps rather than file digest to determine compiler freshness. [PR 97](https://github.com/shakacode/shakapacker/pull/97) by [tomdracz](https://github.com/tomdracz).
|
|
458
466
|
|
|
459
467
|
Rather than calculating SHA digest of all the files in the paths watched by the compiler, we are now comparing the modified time of the `manifest.json` file versus the latest modified timestamp of files and directories in watched paths. Unlike calculating digest, which only looked at the files, the new calculation also considers directory timestamps, including the parent ones (i.e. `config.source_path` folder timestamp will be checked together will timestamps of all files and directories inside of it).
|
|
@@ -464,18 +472,22 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
|
|
|
464
472
|
- Add `webpack-dev-server` as `peerDependency` to make its usage clear. [PR 109](https://github.com/shakacode/shakapacker/pull/109) by [tomdracz](https://github.com/tomdracz).
|
|
465
473
|
|
|
466
474
|
## [v6.2.1] - April 15, 2022
|
|
475
|
+
|
|
467
476
|
### Fixed
|
|
477
|
+
|
|
468
478
|
- Put back config.public_manifest_path, removed in 6.2.0 in PR 78. [PR 104](https://github.com/shakacode/shakapacker/pull/104) by [justin808](https://github.com/justin808).
|
|
469
479
|
|
|
470
480
|
## [v6.2.0] - March 22, 2022
|
|
471
481
|
|
|
472
482
|
### Added
|
|
483
|
+
|
|
473
484
|
- Make manifest_path configurable, to keep manifest.json private if desired. [PR 78](https://github.com/shakacode/shakapacker/pull/78) by [jdelStrother](https://github.com/jdelStrother).
|
|
474
485
|
- Rewrite webpack module rules as regular expressions. Allows for easy iteration during config customization. [PR 60](https://github.com/shakacode/shakapacker/pull/60) by [blnoonan](https://github.com/blnoonan).
|
|
475
486
|
- Initialization check to ensure shakapacker gem and NPM package version are consistent. Opt-in behaviour enabled by setting `ensure_consistent_versioning` configuration variable. [PR 51](https://github.com/shakacode/shakapacker/pull/51) by [tomdracz](https://github.com/tomdracz).
|
|
476
487
|
- Add `dev_server.inline_css: bool` config option to allow for opting out of style-loader and into mini-css-extract-plugin for CSS HMR in development. [PR 69](https://github.com/shakacode/shakapacker/pull/69) by [cheald](https://github.com/cheald).
|
|
477
488
|
|
|
478
489
|
### Improved
|
|
490
|
+
|
|
479
491
|
- Increase default connect timeout for dev server connections, establishing connections more reliably for busy machines. [PR 74](https://github.com/shakacode/shakapacker/pull/74) by [stevecrozz](https://github.com/stevecrozz).
|
|
480
492
|
- Allow multiple invocations of stylesheet_pack_tag (eg for a regular stylesheet & a print stylesheet). [PR 82](https://github.com/shakacode/shakapacker/pull/82) by [jdelStrother](https://github.com/jdelStrother).
|
|
481
493
|
- Tweak swc config for parity with Babel. [PR 79](https://github.com/shakacode/shakapacker/pull/79) by [dleavitt](https://github.com/dleavitt).
|
|
@@ -483,31 +495,39 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
|
|
|
483
495
|
## [v6.1.1] - February 6, 2022
|
|
484
496
|
|
|
485
497
|
### Added
|
|
498
|
+
|
|
486
499
|
- Support for esbuild-loader. [PR 53](https://github.com/shakacode/shakapacker/pull/53) by [tomdracz](https://github.com/tomdracz).
|
|
487
500
|
|
|
488
501
|
## [v6.1.0] - February 4, 2022
|
|
502
|
+
|
|
489
503
|
### Added
|
|
504
|
+
|
|
490
505
|
- Support for SWC loader. [PR 29](https://github.com/shakacode/shakapacker/pull/29) by [tomdracz](https://github.com/tomdracz).
|
|
491
506
|
|
|
492
507
|
### Fixed
|
|
508
|
+
|
|
493
509
|
- Static asset subdirectories are retained after compilation, matching Webpacker v5 behaviour. [PR 47](https://github.com/shakacode/shakapacker/pull/47) by [tomdracz](https://github.com/tomdracz). Fixes issues [rails/webpacker#2956](https://github.com/rails/webpacker/issues/2956) which broke in [rails/webpacker#2802](https://github.com/rails/webpacker/pull/2802).
|
|
494
510
|
|
|
495
511
|
## [v6.0.2] - January 25, 2022
|
|
512
|
+
|
|
496
513
|
### Improved
|
|
514
|
+
|
|
497
515
|
- Fix incorrect command name in warning. [PR 33](https://github.com/shakacode/shakapacker/pull/33) by [tricknotes](https://github.com/tricknotes).
|
|
498
516
|
|
|
499
517
|
## [v6.0.1] - January 24, 2022
|
|
518
|
+
|
|
500
519
|
### Improved
|
|
520
|
+
|
|
501
521
|
- PR #21 removed pnp-webpack-plugin as a dev dependency but did not remove it from the peer dependency list. [PR 30](https://github.com/shakacode/shakapacker/pull/30) by [t27duck](https://github.com/t27duck).
|
|
502
522
|
|
|
503
523
|
## [v6.0.0 changes from v6.0.0.rc.6] - January 22, 2022
|
|
504
524
|
|
|
505
525
|
### Improved
|
|
526
|
+
|
|
506
527
|
- Raise on multiple invocations of javascript_pack_tag and stylesheet_pack_tag helpers. [PR 19](https://github.com/shakacode/shakapacker/pull/19) by [tomdracz](https://github.com/tomdracz).
|
|
507
528
|
- Remove automatic addition of node_modules into rails asset load path. [PR 20](https://github.com/shakacode/shakapacker/pull/20) by [tomdracz](https://github.com/tomdracz).
|
|
508
529
|
- Remove pnp-webpack-plugin. [PR 21](https://github.com/shakacode/shakapacker/pull/21) by [tomdracz](https://github.com/tomdracz).
|
|
509
530
|
|
|
510
|
-
|
|
511
531
|
### Merged from rails/webpacker
|
|
512
532
|
|
|
513
533
|
- Make watched_files_digest thread safe. [rails/webpacker #3233](https://github.com/rails/webpacker/pull/3233)
|
|
@@ -515,18 +535,18 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
|
|
|
515
535
|
- Switch to peer dependencies. [rails/webpacker #3234](https://github.com/rails/webpacker/pull/3234)
|
|
516
536
|
|
|
517
537
|
### Upgrading from rails/webpacker 6.0.0.rc.6
|
|
538
|
+
|
|
518
539
|
- Single default configuration file of `config/webpack/webpack.config.js`. Previously, the config file was set
|
|
519
540
|
to `config/webpack/#{NODE_ENV}.js`.
|
|
520
541
|
- Changed all package.json dependencies to peerDependencies, so upgrading requires adding the dependencies, per the [UPGRADE GUIDE](./docs/v6_upgrade.md).
|
|
521
542
|
|
|
522
543
|
## [v6.0.0.rc.6 changes from v5.4] - Forked January 16, 2022
|
|
523
544
|
|
|
524
|
-
|
|
525
545
|
- `node_modules` will no longer be babel transformed compiled by default. This primarily fixes [rails issue #35501](https://github.com/rails/rails/issues/35501) as well as [numerous other webpacker issues](https://github.com/rails/webpacker/issues/2131#issuecomment-581618497). The disabled loader can still be required explicitly via:
|
|
526
546
|
|
|
527
547
|
```js
|
|
528
|
-
const nodeModules = require(
|
|
529
|
-
environment.loaders.append(
|
|
548
|
+
const nodeModules = require("@rails/webpacker/rules/node_modules.js")
|
|
549
|
+
environment.loaders.append("nodeModules", nodeModules)
|
|
530
550
|
```
|
|
531
551
|
|
|
532
552
|
- If you have added `environment.loaders.delete('nodeModules')` to your `environment.js`, this must be removed or you will receive an error (`Item nodeModules not found`).
|
|
@@ -539,16 +559,18 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
|
|
|
539
559
|
- Deprecated configuration option `watched_paths`. Use `additional_paths` instead in `webpacker.yml`.
|
|
540
560
|
|
|
541
561
|
### Breaking changes
|
|
562
|
+
|
|
542
563
|
- Renamed `/bin/webpack` to `/bin/webpacker` and `/bin/webpack-dev-server` to `bin/webpacker-dev-server` to avoid confusion with underlying webpack executables.
|
|
543
564
|
- Removed integration installers
|
|
544
565
|
- Splitchunks enabled by default
|
|
545
566
|
- CSS extraction enabled by default, except when devServer is configured and running
|
|
546
567
|
|
|
547
568
|
## v5.4.3 and prior changes from rails/webpacker
|
|
569
|
+
|
|
548
570
|
See [CHANGELOG.md in rails/webpacker (up to v5.4.3)](https://github.com/rails/webpacker/blob/master/CHANGELOG.md)
|
|
549
571
|
|
|
550
|
-
[Unreleased]: https://github.com/shakacode/shakapacker/compare/v9.0.0-beta.
|
|
551
|
-
[v9.0.0-beta.
|
|
572
|
+
[Unreleased]: https://github.com/shakacode/shakapacker/compare/v9.0.0-beta.8...main
|
|
573
|
+
[v9.0.0-beta.8]: https://github.com/shakacode/shakapacker/compare/v8.4.0...v9.0.0-beta.8
|
|
552
574
|
[v8.4.0]: https://github.com/shakacode/shakapacker/compare/v8.3.0...v8.4.0
|
|
553
575
|
[v8.3.0]: https://github.com/shakacode/shakapacker/compare/v8.2.0...v8.3.0
|
|
554
576
|
[v8.2.0]: https://github.com/shakacode/shakapacker/compare/v8.1.0...v8.2.0
|