shakapacker 7.0.0 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/shakapacker/version.rb +1 -1
- data/package/environments/__tests__/production.js +39 -0
- data/package/environments/production.js +1 -1
- data/package.json +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4aaa412d5721d91a27e137f18413f5c3782c8a922911b35fa712f776d04e31b
|
4
|
+
data.tar.gz: afabe31c503c8bfabe21d52fa0e401c9f4b80696a274013058ef417f0b419c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b2367ca20d0cb3da0ff8265ad22551bf288706d76afa84ace8700d091a99b6c201bf11d44116481bd1e89336ea154972314f3a2117cb14ad6dd3bd2152012d9
|
7
|
+
data.tar.gz: f1cbdf73ce49838513d888ccc86c20185331bc4d0e7934ff88d7ee7d2c4a89efed8e98253c511351ce32bec9faefc0d73c899e07a268fb977cacd772788b841d
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,9 @@ Changes since last non-beta release.
|
|
9
9
|
|
10
10
|
_Please add entries here for your pull requests that are not yet released._
|
11
11
|
|
12
|
+
### Fixed
|
13
|
+
- 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).
|
14
|
+
|
12
15
|
### Breaking changes
|
13
16
|
- Removes defaults passed to `@babel/preset-typescript`. [PR 273](https://github.com/shakacode/shakapacker/pull/273) by [tomdracz](https://github.com/tomdracz).
|
14
17
|
|
data/lib/shakapacker/version.rb
CHANGED
@@ -23,6 +23,19 @@ describe('Production specific config', () => {
|
|
23
23
|
'js/[name]-[contenthash].chunk.js'
|
24
24
|
)
|
25
25
|
})
|
26
|
+
|
27
|
+
test("doesn't shows any warning message", () => {
|
28
|
+
const consoleWarnSpy = jest.spyOn(console, 'warn');
|
29
|
+
const config = require("../../config");
|
30
|
+
config.useContentHash = true
|
31
|
+
const environmnetConfig = require('../production')
|
32
|
+
|
33
|
+
expect(consoleWarnSpy).not.toHaveBeenCalledWith(
|
34
|
+
expect.stringMatching(/Setting 'useContentHash' to 'false' in the production environment/)
|
35
|
+
)
|
36
|
+
|
37
|
+
consoleWarnSpy.mockRestore()
|
38
|
+
})
|
26
39
|
})
|
27
40
|
|
28
41
|
describe('with config.useContentHash = false', () => {
|
@@ -36,6 +49,19 @@ describe('Production specific config', () => {
|
|
36
49
|
'js/[name]-[contenthash].chunk.js'
|
37
50
|
)
|
38
51
|
})
|
52
|
+
|
53
|
+
test('shows a warning message', () => {
|
54
|
+
const consoleWarnSpy = jest.spyOn(console, 'warn');
|
55
|
+
const config = require("../../config");
|
56
|
+
config.useContentHash = false
|
57
|
+
const environmnetConfig = require('../production')
|
58
|
+
|
59
|
+
expect(consoleWarnSpy).toHaveBeenCalledWith(
|
60
|
+
expect.stringMatching(/Setting 'useContentHash' to 'false' in the production environment/)
|
61
|
+
)
|
62
|
+
|
63
|
+
consoleWarnSpy.mockRestore()
|
64
|
+
})
|
39
65
|
})
|
40
66
|
|
41
67
|
describe('with unset config.useContentHash', () => {
|
@@ -49,5 +75,18 @@ describe('Production specific config', () => {
|
|
49
75
|
'js/[name]-[contenthash].chunk.js'
|
50
76
|
)
|
51
77
|
})
|
78
|
+
|
79
|
+
test("doesn't shows any warning message", () => {
|
80
|
+
const consoleWarnSpy = jest.spyOn(console, 'warn');
|
81
|
+
const config = require("../../config");
|
82
|
+
delete config.useContentHash
|
83
|
+
const environmnetConfig = require('../production')
|
84
|
+
|
85
|
+
expect(consoleWarnSpy).not.toHaveBeenCalledWith(
|
86
|
+
expect.stringMatching(/Setting 'useContentHash' to 'false' in the production environment/)
|
87
|
+
)
|
88
|
+
|
89
|
+
consoleWarnSpy.mockRestore()
|
90
|
+
})
|
52
91
|
})
|
53
92
|
})
|
@@ -77,7 +77,7 @@ const productionConfig = {
|
|
77
77
|
}
|
78
78
|
}
|
79
79
|
|
80
|
-
if (config.useContentHash ===
|
80
|
+
if (config.useContentHash === false) {
|
81
81
|
// eslint-disable-next-line no-console
|
82
82
|
console.warn(`⚠️ WARNING
|
83
83
|
Setting 'useContentHash' to 'false' in the production environment (specified by NODE_ENV environment variable) is not allowed!
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shakapacker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-06-
|
13
|
+
date: 2023-06-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -528,7 +528,7 @@ homepage: https://github.com/shakacode/shakapacker
|
|
528
528
|
licenses:
|
529
529
|
- MIT
|
530
530
|
metadata:
|
531
|
-
source_code_uri: https://github.com/shakacode/shakapacker/tree/v7.0.
|
531
|
+
source_code_uri: https://github.com/shakacode/shakapacker/tree/v7.0.1
|
532
532
|
post_install_message:
|
533
533
|
rdoc_options: []
|
534
534
|
require_paths:
|