webpacker 5.2.2 → 5.4.2

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: 540ab4b21b95b53f23abdbdab857d6a96ac276ad7e97108f53bf485e1e74f999
4
- data.tar.gz: 172e9f89861c6ab9806ce5cdd95fb6ba71113afd3af263fedfc2b3f519cda3db
3
+ metadata.gz: b1fffe5b7638d5277bcdea3ec973e476ce99f969a963a724facd3acccac00cb0
4
+ data.tar.gz: 46a6867ae973359de996b70da2a082331f85b841556c7e010feaa84c4d93d54a
5
5
  SHA512:
6
- metadata.gz: 749520c5ab452f04ce21c59f198b859f1195898bceb0d74c589ed1958ddf33dacc2a6a893a26b9a1f474668d4ad536386ab3f652a55bf8a04e440b3f44d88f7b
7
- data.tar.gz: 1adf0f5cd1f8360df0b3c0d09f8410afb68e164e13377d46970b83ccf5deac6f06759bace31cd0caa961c7775f7fbfb97c2ac6068b3ce5f5528eb703f87087c2
6
+ metadata.gz: 671dfd0980abb4665adc7b6bab5a1e7e4e8478c77475e151f75ac02930384818c8835f95785bc4fa981480f2378783f56f4dc0f91e93ff485394cc152e11fe8c
7
+ data.tar.gz: 3e7263bc2c9d30250f74f18b02a340064468cefc8ec07f33dd6866c986ccbfca0dfb4a98306801519f95f38b8191f1d2c92479fa8901f13d52c2bf493719b147
@@ -29,14 +29,6 @@ jobs:
29
29
  gemfile: gemfiles/Gemfile-rails.6.0.x
30
30
  experimental: [false]
31
31
  include:
32
- - ruby: 2.5
33
- os: ubuntu-latest
34
- gemfile: gemfiles/Gemfile-rails-edge
35
- experimental: true
36
- - ruby: 2.6
37
- os: ubuntu-latest
38
- gemfile: gemfiles/Gemfile-rails-edge
39
- experimental: true
40
32
  - ruby: 2.7
41
33
  os: ubuntu-latest
42
34
  gemfile: gemfiles/Gemfile-rails-edge
data/.node-version CHANGED
@@ -1 +1 @@
1
- 10.17.0
1
+ 16.2.0
data/CHANGELOG.md CHANGED
@@ -2,19 +2,35 @@
2
2
 
3
3
  **Please note that Webpacker 4.1.0 has an installer bug. Please use 4.2.0 or above**
4
4
 
5
- ## [[5.3.0]](https://github.com/rails/webpacker/compare/v5.3.0...5.2.1) - 2021-TBD
5
+ ## [[5.4.2]](https://github.com/rails/webpacker/compare/v5.4.0...v5.4.1) - 2021-08-20
6
+
7
+ - Fix babel warning about private-methods in @babel/plugin-proposal-private-property-in-object as well.
8
+
9
+ ## [[5.4.1]](https://github.com/rails/webpacker/compare/v5.4.0...v5.4.1) - 2021-08-20
10
+
11
+ - Update all dependencies within the same major version (#3120)
12
+
13
+ - Fix babel warning about private-methods (#3016)
14
+
15
+ ## [[5.4.0]](https://github.com/rails/webpacker/compare/v5.3.0...v5.4.0) - 2021-05-18
16
+
17
+ - Fix compatibility with Psych 4
18
+
19
+ ## [[5.3.0]](https://github.com/rails/webpacker/compare/v5.2.1...v5.3.0) - 2021-04-27
6
20
 
7
21
  - Adds experimental Yarn 2 support. Note you must manually set `nodeLinker: node-modules` in your `.yarnrc.yml`.
8
22
 
9
- ## [[5.2.2]](https://github.com/rails/webpacker/compare/v5.2.1...5.2.2) - 2021-04-27
23
+ - Keep backups, even when they're old [#2912](https://github.com/rails/webpacker/pull/2912)
24
+
25
+ ## [[5.2.2]](https://github.com/rails/webpacker/compare/v5.2.1...v5.2.2) - 2021-04-27
10
26
 
11
27
  - Bump deps and remove node-sass [#2997](https://github.com/rails/webpacker/pull/2997).
12
28
 
13
- ## [[5.2.1]](https://github.com/rails/webpacker/compare/v5.2.0...5.2.1) - 2020-08-17
29
+ ## [[5.2.1]](https://github.com/rails/webpacker/compare/v5.2.0...v5.2.1) - 2020-08-17
14
30
 
15
31
  - Revert [#1311](https://github.com/rails/webpacker/pull/1311).
16
32
 
17
- ## [[5.2.0]](https://github.com/rails/webpacker/compare/v5.1.1...5.2.0) - 2020-08-16
33
+ ## [[5.2.0]](https://github.com/rails/webpacker/compare/v5.1.1...v5.2.0) - 2020-08-16
18
34
 
19
35
  - Bump dependencies and fixes. See [diff](https://github.com/rails/webpacker/compare/v5.1.1...5-x-stable) for changes.
20
36
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webpacker (5.2.2)
4
+ webpacker (5.4.0)
5
5
  activesupport (>= 5.2)
6
6
  rack-proxy (>= 0.6.1)
7
7
  railties (>= 5.2)
@@ -10,60 +10,60 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (6.1.3.1)
14
- actionpack (= 6.1.3.1)
15
- activesupport (= 6.1.3.1)
13
+ actioncable (6.1.3.2)
14
+ actionpack (= 6.1.3.2)
15
+ activesupport (= 6.1.3.2)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
- actionmailbox (6.1.3.1)
19
- actionpack (= 6.1.3.1)
20
- activejob (= 6.1.3.1)
21
- activerecord (= 6.1.3.1)
22
- activestorage (= 6.1.3.1)
23
- activesupport (= 6.1.3.1)
18
+ actionmailbox (6.1.3.2)
19
+ actionpack (= 6.1.3.2)
20
+ activejob (= 6.1.3.2)
21
+ activerecord (= 6.1.3.2)
22
+ activestorage (= 6.1.3.2)
23
+ activesupport (= 6.1.3.2)
24
24
  mail (>= 2.7.1)
25
- actionmailer (6.1.3.1)
26
- actionpack (= 6.1.3.1)
27
- actionview (= 6.1.3.1)
28
- activejob (= 6.1.3.1)
29
- activesupport (= 6.1.3.1)
25
+ actionmailer (6.1.3.2)
26
+ actionpack (= 6.1.3.2)
27
+ actionview (= 6.1.3.2)
28
+ activejob (= 6.1.3.2)
29
+ activesupport (= 6.1.3.2)
30
30
  mail (~> 2.5, >= 2.5.4)
31
31
  rails-dom-testing (~> 2.0)
32
- actionpack (6.1.3.1)
33
- actionview (= 6.1.3.1)
34
- activesupport (= 6.1.3.1)
32
+ actionpack (6.1.3.2)
33
+ actionview (= 6.1.3.2)
34
+ activesupport (= 6.1.3.2)
35
35
  rack (~> 2.0, >= 2.0.9)
36
36
  rack-test (>= 0.6.3)
37
37
  rails-dom-testing (~> 2.0)
38
38
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
39
- actiontext (6.1.3.1)
40
- actionpack (= 6.1.3.1)
41
- activerecord (= 6.1.3.1)
42
- activestorage (= 6.1.3.1)
43
- activesupport (= 6.1.3.1)
39
+ actiontext (6.1.3.2)
40
+ actionpack (= 6.1.3.2)
41
+ activerecord (= 6.1.3.2)
42
+ activestorage (= 6.1.3.2)
43
+ activesupport (= 6.1.3.2)
44
44
  nokogiri (>= 1.8.5)
45
- actionview (6.1.3.1)
46
- activesupport (= 6.1.3.1)
45
+ actionview (6.1.3.2)
46
+ activesupport (= 6.1.3.2)
47
47
  builder (~> 3.1)
48
48
  erubi (~> 1.4)
49
49
  rails-dom-testing (~> 2.0)
50
50
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
51
- activejob (6.1.3.1)
52
- activesupport (= 6.1.3.1)
51
+ activejob (6.1.3.2)
52
+ activesupport (= 6.1.3.2)
53
53
  globalid (>= 0.3.6)
54
- activemodel (6.1.3.1)
55
- activesupport (= 6.1.3.1)
56
- activerecord (6.1.3.1)
57
- activemodel (= 6.1.3.1)
58
- activesupport (= 6.1.3.1)
59
- activestorage (6.1.3.1)
60
- actionpack (= 6.1.3.1)
61
- activejob (= 6.1.3.1)
62
- activerecord (= 6.1.3.1)
63
- activesupport (= 6.1.3.1)
54
+ activemodel (6.1.3.2)
55
+ activesupport (= 6.1.3.2)
56
+ activerecord (6.1.3.2)
57
+ activemodel (= 6.1.3.2)
58
+ activesupport (= 6.1.3.2)
59
+ activestorage (6.1.3.2)
60
+ actionpack (= 6.1.3.2)
61
+ activejob (= 6.1.3.2)
62
+ activerecord (= 6.1.3.2)
63
+ activesupport (= 6.1.3.2)
64
64
  marcel (~> 1.0.0)
65
65
  mini_mime (~> 1.0.2)
66
- activesupport (6.1.3.1)
66
+ activesupport (6.1.3.2)
67
67
  concurrent-ruby (~> 1.0, >= 1.0.2)
68
68
  i18n (>= 1.6, < 2)
69
69
  minitest (>= 5.1)
@@ -87,14 +87,14 @@ GEM
87
87
  marcel (1.0.1)
88
88
  method_source (1.0.0)
89
89
  mini_mime (1.0.3)
90
- mini_portile2 (2.5.0)
90
+ mini_portile2 (2.5.1)
91
91
  minitest (5.14.4)
92
92
  nio4r (2.5.7)
93
- nokogiri (1.11.3)
93
+ nokogiri (1.11.4)
94
94
  mini_portile2 (~> 2.5.0)
95
95
  racc (~> 1.4)
96
96
  parallel (1.20.1)
97
- parser (3.0.1.0)
97
+ parser (3.0.1.1)
98
98
  ast (~> 2.4.1)
99
99
  racc (1.5.2)
100
100
  rack (2.2.3)
@@ -102,29 +102,29 @@ GEM
102
102
  rack
103
103
  rack-test (1.1.0)
104
104
  rack (>= 1.0, < 3)
105
- rails (6.1.3.1)
106
- actioncable (= 6.1.3.1)
107
- actionmailbox (= 6.1.3.1)
108
- actionmailer (= 6.1.3.1)
109
- actionpack (= 6.1.3.1)
110
- actiontext (= 6.1.3.1)
111
- actionview (= 6.1.3.1)
112
- activejob (= 6.1.3.1)
113
- activemodel (= 6.1.3.1)
114
- activerecord (= 6.1.3.1)
115
- activestorage (= 6.1.3.1)
116
- activesupport (= 6.1.3.1)
105
+ rails (6.1.3.2)
106
+ actioncable (= 6.1.3.2)
107
+ actionmailbox (= 6.1.3.2)
108
+ actionmailer (= 6.1.3.2)
109
+ actionpack (= 6.1.3.2)
110
+ actiontext (= 6.1.3.2)
111
+ actionview (= 6.1.3.2)
112
+ activejob (= 6.1.3.2)
113
+ activemodel (= 6.1.3.2)
114
+ activerecord (= 6.1.3.2)
115
+ activestorage (= 6.1.3.2)
116
+ activesupport (= 6.1.3.2)
117
117
  bundler (>= 1.15.0)
118
- railties (= 6.1.3.1)
118
+ railties (= 6.1.3.2)
119
119
  sprockets-rails (>= 2.0.0)
120
120
  rails-dom-testing (2.0.3)
121
121
  activesupport (>= 4.2.0)
122
122
  nokogiri (>= 1.6)
123
123
  rails-html-sanitizer (1.3.0)
124
124
  loofah (~> 2.3)
125
- railties (6.1.3.1)
126
- actionpack (= 6.1.3.1)
127
- activesupport (= 6.1.3.1)
125
+ railties (6.1.3.2)
126
+ actionpack (= 6.1.3.2)
127
+ activesupport (= 6.1.3.2)
128
128
  method_source
129
129
  rake (>= 0.8.7)
130
130
  thor (~> 1.0)
@@ -141,8 +141,8 @@ GEM
141
141
  rubocop-ast (>= 0.6.0)
142
142
  ruby-progressbar (~> 1.7)
143
143
  unicode-display_width (>= 1.4.0, < 2.0)
144
- rubocop-ast (1.4.1)
145
- parser (>= 2.7.1.5)
144
+ rubocop-ast (1.5.0)
145
+ parser (>= 3.0.1.1)
146
146
  rubocop-performance (1.10.2)
147
147
  rubocop (>= 0.90.0, < 2.0)
148
148
  rubocop-ast (>= 0.4.0)
@@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
4
4
 
5
5
  gemspec path: "../"
6
6
 
7
- gem "rails", github: "rails/rails"
7
+ gem "rails", github: "rails/rails", branch: "main"
8
8
  gem "arel", github: "rails/arel"
9
9
  gem "rake", ">= 11.1"
10
10
  gem "rack-proxy", require: false
@@ -53,6 +53,18 @@ module.exports = function(api) {
53
53
  useBuiltIns: true
54
54
  }
55
55
  ],
56
+ [
57
+ '@babel/plugin-proposal-private-methods',
58
+ {
59
+ loose: true
60
+ }
61
+ ],
62
+ [
63
+ '@babel/plugin-proposal-private-property-in-object',
64
+ {
65
+ loose: true
66
+ }
67
+ ],
56
68
  [
57
69
  '@babel/plugin-transform-runtime',
58
70
  {
@@ -62,6 +62,18 @@ module.exports = function(api) {
62
62
  useBuiltIns: true
63
63
  }
64
64
  ],
65
+ [
66
+ '@babel/plugin-proposal-private-methods',
67
+ {
68
+ loose: true
69
+ }
70
+ ],
71
+ [
72
+ '@babel/plugin-proposal-private-property-in-object',
73
+ {
74
+ loose: true
75
+ }
76
+ ],
65
77
  [
66
78
  '@babel/plugin-transform-runtime',
67
79
  {
@@ -9,7 +9,7 @@ namespace :webpacker do
9
9
  pkg_path = Pathname.new("#{__dir__}/../../../package.json").realpath
10
10
  yarn_range = JSON.parse(pkg_path.read)["engines"]["yarn"]
11
11
  is_valid = SemanticRange.satisfies?(yarn_version, yarn_range) rescue false
12
- is_unsupported = SemanticRange.satisfies?(yarn_version, ">=3.0.0") rescue false
12
+ is_unsupported = SemanticRange.satisfies?(yarn_version, ">=4.0.0") rescue false
13
13
 
14
14
  unless is_valid
15
15
  $stderr.puts "Webpacker requires Yarn \"#{yarn_range}\" and you are using #{yarn_version}"
@@ -23,7 +23,7 @@ class Webpacker::Commands
23
23
  .each_with_index
24
24
  .drop_while do |(mtime, _), index|
25
25
  max_age = [0, Time.now - Time.at(mtime)].max
26
- max_age < age && index < count
26
+ max_age < age || index < count
27
27
  end
28
28
  .each do |(_, files), index|
29
29
  files.each do |file|
@@ -93,8 +93,12 @@ class Webpacker::Configuration
93
93
  end
94
94
 
95
95
  def load
96
- YAML.load(config_path.read)[env].deep_symbolize_keys
97
-
96
+ config = begin
97
+ YAML.load_file(config_path.to_s, aliases: true)
98
+ rescue ArgumentError
99
+ YAML.load_file(config_path.to_s)
100
+ end
101
+ config[env].deep_symbolize_keys
98
102
  rescue Errno::ENOENT => e
99
103
  raise "Webpacker configuration file not found #{config_path}. " \
100
104
  "Please run rails webpacker:install " \
@@ -107,8 +111,15 @@ class Webpacker::Configuration
107
111
  end
108
112
 
109
113
  def defaults
110
- @defaults ||= \
111
- HashWithIndifferentAccess.new(YAML.load_file(File.expand_path("../../install/config/webpacker.yml", __FILE__))[env])
114
+ @defaults ||= begin
115
+ path = File.expand_path("../../install/config/webpacker.yml", __FILE__)
116
+ config = begin
117
+ YAML.load_file(path, aliases: true)
118
+ rescue ArgumentError
119
+ YAML.load_file(path)
120
+ end
121
+ HashWithIndifferentAccess.new(config[env])
122
+ end
112
123
  end
113
124
 
114
125
  def globbed_path_with_extensions(path)
data/lib/webpacker/env.rb CHANGED
@@ -27,7 +27,11 @@ class Webpacker::Env
27
27
 
28
28
  def available_environments
29
29
  if config_path.exist?
30
- YAML.load(config_path.read).keys
30
+ begin
31
+ YAML.load_file(config_path.to_s, aliases: true)
32
+ rescue ArgumentError
33
+ YAML.load_file(config_path.to_s)
34
+ end
31
35
  else
32
36
  [].freeze
33
37
  end
@@ -1,4 +1,4 @@
1
1
  module Webpacker
2
2
  # Change the version in package.json too, please!
3
- VERSION = "5.2.2".freeze
3
+ VERSION = "5.4.2".freeze
4
4
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rails/webpacker",
3
- "version": "5.2.2",
3
+ "version": "5.4.2",
4
4
  "description": "Use webpack to manage app-like JavaScript modules in Rails",
5
5
  "main": "package/index.js",
6
6
  "files": [
@@ -9,40 +9,40 @@
9
9
  ],
10
10
  "engines": {
11
11
  "node": ">=10.17.0",
12
- "yarn": ">=1 <3"
12
+ "yarn": ">=1 <4"
13
13
  },
14
14
  "dependencies": {
15
- "@babel/core": "^7.13.16",
16
- "@babel/plugin-proposal-class-properties": "^7.13.0",
17
- "@babel/plugin-proposal-object-rest-spread": "^7.13.8",
15
+ "@babel/core": "^7.15.0",
16
+ "@babel/plugin-proposal-class-properties": "^7.14.5",
17
+ "@babel/plugin-proposal-object-rest-spread": "^7.14.7",
18
18
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
19
- "@babel/plugin-transform-destructuring": "^7.13.17",
20
- "@babel/plugin-transform-regenerator": "^7.13.15",
21
- "@babel/plugin-transform-runtime": "^7.13.15",
22
- "@babel/preset-env": "^7.13.15",
23
- "@babel/runtime": "^7.13.17",
19
+ "@babel/plugin-transform-destructuring": "^7.14.7",
20
+ "@babel/plugin-transform-regenerator": "^7.14.5",
21
+ "@babel/plugin-transform-runtime": "^7.15.0",
22
+ "@babel/preset-env": "^7.15.0",
23
+ "@babel/runtime": "^7.15.3",
24
24
  "babel-loader": "^8.2.2",
25
25
  "babel-plugin-dynamic-import-node": "^2.3.3",
26
26
  "babel-plugin-macros": "^2.8.0",
27
27
  "case-sensitive-paths-webpack-plugin": "^2.4.0",
28
28
  "compression-webpack-plugin": "^4.0.1",
29
- "core-js": "^3.11.0",
29
+ "core-js": "^3.16.2",
30
30
  "css-loader": "^3.6.0",
31
31
  "file-loader": "^6.2.0",
32
- "flatted": "^3.1.1",
33
- "glob": "^7.1.6",
32
+ "flatted": "^3.2.2",
33
+ "glob": "^7.1.7",
34
34
  "js-yaml": "^3.14.1",
35
35
  "mini-css-extract-plugin": "^0.9.0",
36
- "optimize-css-assets-webpack-plugin": "^5.0.4",
36
+ "optimize-css-assets-webpack-plugin": "^5.0.8",
37
37
  "path-complete-extname": "^1.0.0",
38
- "pnp-webpack-plugin": "^1.6.4",
38
+ "pnp-webpack-plugin": "^1.7.0",
39
39
  "postcss-flexbugs-fixes": "^4.2.1",
40
40
  "postcss-import": "^12.0.1",
41
41
  "postcss-loader": "^3.0.0",
42
42
  "postcss-preset-env": "^6.7.0",
43
43
  "postcss-safe-parser": "^4.0.2",
44
- "regenerator-runtime": "^0.13.7",
45
- "sass": "^1.32.11",
44
+ "regenerator-runtime": "^0.13.9",
45
+ "sass": "^1.38.0",
46
46
  "sass-loader": "10.1.1",
47
47
  "style-loader": "^1.3.0",
48
48
  "terser-webpack-plugin": "^4.2.3",
@@ -52,12 +52,12 @@
52
52
  "webpack-sources": "^1.4.3"
53
53
  },
54
54
  "devDependencies": {
55
- "eslint": "^7.25.0",
55
+ "eslint": "^7.32.0",
56
56
  "eslint-config-airbnb": "^18.2.1",
57
- "eslint-plugin-import": "^2.22.1",
57
+ "eslint-plugin-import": "^2.24.0",
58
58
  "eslint-plugin-jsx-a11y": "^6.4.1",
59
- "eslint-plugin-react": "^7.23.2",
60
- "jest": "^26.6.3"
59
+ "eslint-plugin-react": "^7.24.0",
60
+ "jest": "^27.0.6"
61
61
  },
62
62
  "jest": {
63
63
  "testRegex": "(/__tests__/.*|(\\.|/))\\.jsx?$",