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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0eef3643fb556af4dc928c1d651fa46cfe5543fc6d5a227d29fcbfd7b3876c3c
4
- data.tar.gz: 4530e671bb02c0af5bbfc37ba1696fff4e81548c40af6df65a06e2bc2d0a9815
3
+ metadata.gz: d4aaa412d5721d91a27e137f18413f5c3782c8a922911b35fa712f776d04e31b
4
+ data.tar.gz: afabe31c503c8bfabe21d52fa0e401c9f4b80696a274013058ef417f0b419c26
5
5
  SHA512:
6
- metadata.gz: a7803b77d1d0e9dff88d6cdb25f88c1a89fb4c036153e03d153fe994b216a82a69aaa85d446331945a528443fbd097ac4f49cb64661e66f29b5941a5971315a8
7
- data.tar.gz: 98aba0b391b59a50932d43cab666604998d66c5bcf548f8ceea06c77919a9196ba5ca2861a204ce3f66cd490d69b64e0e8c0dfb10610b6ba64842049f49d2df4
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
 
@@ -1,4 +1,4 @@
1
1
  module Shakapacker
2
2
  # Change the version in package.json too, please!
3
- VERSION = "7.0.0".freeze
3
+ VERSION = "7.0.1".freeze
4
4
  end
@@ -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 === true) {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shakapacker",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "Use webpack to manage app-like JavaScript modules in Rails",
5
5
  "main": "package/index.js",
6
6
  "files": [
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.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-23 00:00:00.000000000 Z
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.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: