shakapacker 7.0.0.rc.2 → 7.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58893ea0632011344e72e3fc4c887459f8e24872c5c5ab28792d1339d6d425e8
4
- data.tar.gz: 2afede128c27cf45a4fcef08462fb9a64f5b89931075fdf89bd787af710939bd
3
+ metadata.gz: d4aaa412d5721d91a27e137f18413f5c3782c8a922911b35fa712f776d04e31b
4
+ data.tar.gz: afabe31c503c8bfabe21d52fa0e401c9f4b80696a274013058ef417f0b419c26
5
5
  SHA512:
6
- metadata.gz: 7f49df282d8a4e42b28b2172a5f48b88d757c609323b57ffad3ab50091b3cea96110fcd5e6c9f865ab9552a7d49d51c864769ed0667c691f44f56d065b7d70ed
7
- data.tar.gz: 1930a5cedaa8831fae4bbcab4e8baa05571414508ade9403e7b8a0ebd86f366d727ef6d3996e02a0a40e8b2faf21fdc5b4153a1fd7debd16e8467a8035071ee5
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.rc.2".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-rc.2",
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.rc.2
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-22 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-rc.2
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:
@@ -540,9 +540,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
540
540
  version: 2.6.0
541
541
  required_rubygems_version: !ruby/object:Gem::Requirement
542
542
  requirements:
543
- - - ">"
543
+ - - ">="
544
544
  - !ruby/object:Gem::Version
545
- version: 1.3.1
545
+ version: '0'
546
546
  requirements: []
547
547
  rubygems_version: 3.4.12
548
548
  signing_key: