shakapacker 6.0.0.rc.6 → 6.0.0.rc.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -5
- data/README.md +3 -1
- data/lib/shakapacker/utils/misc.rb +36 -0
- data/lib/webpacker/version.rb +1 -1
- data/package.json +1 -1
- data/rakelib/release.rake +18 -11
- metadata +3 -3
- data/lib/shakapacker/utils/git_utils.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ba657aae9dfeb59090b6199029f76386c42623c57f3a97a95f91ef34e6aafc6
|
4
|
+
data.tar.gz: 26ee13bf4652772256fd0ef3e2e1e2013a08bde979172660ec4c17778fe8f582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95e60f443c8cff3af9c486e5654b6c57ee6a8a47458659ba6df09c4ed59eef16822c8de9d39b4e877b93e7a235230c9a176763ae1c2e6bb762fd721a99a5edf9
|
7
|
+
data.tar.gz: ae7fcfed84f078ad216b48dcd4d5f227819132e30f642ffaa2fbe5b566aa6c29e4ae46d49da7e769947228be877829bac60ae13e93cb359e9400a0a6fa2786f1
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,30 @@
|
|
1
1
|
For versions prior to v6, see the [5.x stable branch of rails/webpacker](https://github.com/rails/webpacker/tree/5-x-stable).
|
2
2
|
|
3
|
-
## [[6.0.0]](https://github.com/rails/webpacker/compare/v5.4.3...master) - 2022
|
4
3
|
|
5
|
-
|
4
|
+
## Versions
|
5
|
+
### [Unreleased]
|
6
|
+
Changes since last non-beta release.
|
6
7
|
|
7
|
-
Please
|
8
|
+
*Please add entries here for your pull requests that are not yet released.*
|
9
|
+
|
10
|
+
## [6.0.0.rc.12]
|
11
|
+
|
12
|
+
### Merged from rails/webpacker
|
13
|
+
|
14
|
+
- Make watched_files_digest thread safe. [rails/webpacker #3233](https://github.com/rails/webpacker/pull/3233)
|
15
|
+
- Use single webpack config webpack.config.js. [rails/webpacker #3240](https://github.com/rails/webpacker/pull/3240)
|
16
|
+
- Switch to peer dependencies. [rails/webpacker #3234](https://github.com/rails/webpacker/pull/3234)
|
17
|
+
|
18
|
+
### Upgrading from rails/webpacker 6.0.0.rc.6
|
8
19
|
- Single default configuration file of `config/webpack/webpack.config.js`. Previously, the config file was set
|
9
|
-
to `config/webpack/#{NODE_ENV}.js`.
|
20
|
+
to `config/webpack/#{NODE_ENV}.js`.
|
21
|
+
- Changed all package.json dependencies to peerDependencies, so upgrading requires adding the dependencies, per the [UPGRADE GUIDE](./docs/v6_upgrade.md).
|
10
22
|
|
23
|
+
## [6.0.0.rc.6] - Forked January 16, 2022
|
24
|
+
|
25
|
+
Latest is rc.9.
|
26
|
+
|
27
|
+
Please see [UPGRADE GUIDE](./docs/v6_upgrade.md) for more information.
|
11
28
|
- `node_modules` will no longer be babel transfomed 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:
|
12
29
|
|
13
30
|
```js
|
@@ -22,7 +39,6 @@ Please see [UPGRADE GUIDE](./docs/v6_upgrade.md) for more information.
|
|
22
39
|
- Adds experimental Yarn 2 support. Note you must manually set `nodeLinker: node-modules` in your `.yarnrc.yml`.
|
23
40
|
- Fixes dev server issues [#2898](https://github.com/rails/webpacker/pull/2898)
|
24
41
|
- Update static files path to from `media/` to `static/`.
|
25
|
-
- Changed all package.json dependencies to peerDependencies, so upgrading requires adding the dependencies, per the [UPGRADE GUIDE](./docs/v6_upgrade.md).
|
26
42
|
- Deprecated configuration option `watched_paths`. Use `additional_paths` instead in `webpacker.yml`.
|
27
43
|
|
28
44
|
### Breaking changes
|
@@ -30,3 +46,8 @@ Please see [UPGRADE GUIDE](./docs/v6_upgrade.md) for more information.
|
|
30
46
|
- Removed integration installers
|
31
47
|
- Splitchunks enabled by default
|
32
48
|
- CSS extraction enabled by default, except when devServer is configured and running
|
49
|
+
|
50
|
+
|
51
|
+
[Unreleased]: https://github.com/shakacode/shakapacker/compare/6.0.0-rc.11...master
|
52
|
+
[6.0.0.rc.12]: https://github.com/shakacode/shakapacker/compare/aba79635e6ff6562ec04d3c446d57ef19a5fef7d...6.0.0-rc.12
|
53
|
+
[6.0.0.rc.6]: https://github.com/rails/webpacker/compare/v5.4.3...aba79635e6ff6562ec04d3c446d57ef19a5fef7d
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Shakapacker
|
2
2
|
|
3
|
+
_Actively maintained fork of [rails/webpacker](https://github.com/rails/webpacker). For pre v6, see [rails/webpacker 5-x-stable](https://github.com/rails/webpacker/tree/5-x-stable). Be sure to see the [CHANGELOG](./CHANGELOG.md)._
|
3
4
|
|
4
|
-
|
5
|
+
Note, internal naming will continue to use `webpacker` where possible.
|
5
6
|
|
6
7
|
[![Ruby specs](https://github.com/shakacode/shakapacker/workflows/Ruby%20specs/badge.svg)](https://github.com/shakacode/shakapacker/actions)
|
7
8
|
[![Jest specs](https://github.com/shakacode/shakapacker/workflows/Jest%20specs/badge.svg)](https://github.com/shakacode/shakapacker/actions)
|
@@ -16,6 +17,7 @@ Webpacker makes it easy to use the JavaScript pre-processor and bundler
|
|
16
17
|
to manage application-like JavaScript in Rails. It can coexist with the asset pipeline,
|
17
18
|
leaving Webpack responsible solely for app-like JavaScript, or it can be used exclusively, making it also responsible for images, fonts, and CSS.
|
18
19
|
|
20
|
+
See a comparison of [webpacker with jsbundling-rails](https://github.com/rails/jsbundling-rails/blob/main/docs/comparison_with_webpacker.md).
|
19
21
|
|
20
22
|
Visit [Shipping Webpacker v6 – Status](https://discuss.rubyonrails.org/t/shipping-webpacker-v6-status/79683) for the latest news on a v6 release.
|
21
23
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "English"
|
4
|
+
require "rake/file_utils"
|
5
|
+
|
6
|
+
module Shakapacker
|
7
|
+
module Utils
|
8
|
+
class Misc
|
9
|
+
extend FileUtils
|
10
|
+
|
11
|
+
def self.uncommitted_changes?(message_handler)
|
12
|
+
return false if ENV["COVERAGE"] == "true"
|
13
|
+
|
14
|
+
status = `git status --porcelain`
|
15
|
+
return false if $CHILD_STATUS.success? && status.empty?
|
16
|
+
|
17
|
+
error = if $CHILD_STATUS.success?
|
18
|
+
"You have uncommitted code. Please commit or stash your changes before continuing"
|
19
|
+
else
|
20
|
+
"You do not have Git installed. Please install Git, and commit your changes before continuing"
|
21
|
+
end
|
22
|
+
message_handler.add_error(error)
|
23
|
+
true
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.object_to_boolean(value)
|
27
|
+
[true, "true", "yes", 1, "1", "t"].include?(value.instance_of?(String) ? value.downcase : value)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Executes a string or an array of strings in a shell in the given directory in an unbundled environment
|
31
|
+
def self.sh_in_dir(dir, *shell_commands)
|
32
|
+
shell_commands.flatten.each { |shell_command| sh %(cd #{dir} && #{shell_command.strip}) }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/webpacker/version.rb
CHANGED
data/package.json
CHANGED
data/rakelib/release.rake
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require_relative File.join("..", "lib", "shakapacker", "utils", "version_syntax_converter")
|
2
|
-
require_relative File.join("..", "lib", "shakapacker", "utils", "
|
2
|
+
require_relative File.join("..", "lib", "shakapacker", "utils", "misc")
|
3
3
|
|
4
4
|
class RaisingMessageHandler
|
5
5
|
def add_error(error)
|
@@ -24,34 +24,41 @@ which are installed via `bundle install` and `yarn global add release-it`
|
|
24
24
|
Note, accept defaults for npmjs options. Script will pause to get 2FA tokens.
|
25
25
|
|
26
26
|
Example: `rake release[2.1.0,false]`")
|
27
|
-
task :
|
27
|
+
task :create_release, %i[gem_version dry_run] do |_t, args|
|
28
28
|
# Check if there are uncommited changes
|
29
|
-
Shakapacker::
|
29
|
+
Shakapacker::Utils::Misc.uncommitted_changes?(RaisingMessageHandler.new)
|
30
30
|
args_hash = args.to_hash
|
31
31
|
|
32
|
-
is_dry_run = Shakapacker::Utils.object_to_boolean(args_hash[:dry_run])
|
32
|
+
is_dry_run = Shakapacker::Utils::Misc.object_to_boolean(args_hash[:dry_run])
|
33
33
|
|
34
34
|
gem_version = args_hash.fetch(:gem_version, "")
|
35
35
|
|
36
36
|
gem_root = File.expand_path("..", __dir__)
|
37
37
|
|
38
38
|
npm_version = if gem_version.strip.empty?
|
39
|
-
|
39
|
+
""
|
40
40
|
else
|
41
|
-
Shakapacker::VersionSyntaxConverter.new.rubygem_to_npm(gem_version)
|
42
|
-
|
41
|
+
Shakapacker::Utils::VersionSyntaxConverter.new.rubygem_to_npm(gem_version)
|
42
|
+
end
|
43
43
|
|
44
44
|
# See https://github.com/svenfuchs/gem-release
|
45
|
-
sh_in_dir(gem_root, "git pull --rebase")
|
46
|
-
sh_in_dir(gem_root, "gem bump --no-commit #{gem_version.strip.empty? ? '' : %(--version #{gem_version})}")
|
45
|
+
Shakapacker::Utils::Misc.sh_in_dir(gem_root, "git pull --rebase")
|
46
|
+
Shakapacker::Utils::Misc.sh_in_dir(gem_root, "gem bump --no-commit #{gem_version.strip.empty? ? '' : %(--version #{gem_version})}")
|
47
47
|
|
48
48
|
# Will bump the yarn version, commit, tag the commit, push to repo, and release on yarn
|
49
49
|
release_it_command = +"release-it"
|
50
50
|
release_it_command << " #{npm_version}" unless npm_version.strip.empty?
|
51
51
|
release_it_command << " --npm.publish --no-git.requireCleanWorkingDir"
|
52
52
|
release_it_command << " --dry-run --verbose" if is_dry_run
|
53
|
-
|
53
|
+
puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
|
54
|
+
puts "Use the OTP for NPM!"
|
55
|
+
puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
|
56
|
+
Shakapacker::Utils::Misc.sh_in_dir(gem_root, release_it_command)
|
54
57
|
|
55
58
|
# Release the new gem version
|
56
|
-
|
59
|
+
puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
|
60
|
+
puts "Use the OTP for RubyGems!"
|
61
|
+
puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
|
62
|
+
|
63
|
+
Shakapacker::Utils::Misc.sh_in_dir(gem_root, "gem release") unless is_dry_run
|
57
64
|
end
|
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: 6.0.0.rc.
|
4
|
+
version: 6.0.0.rc.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -157,7 +157,7 @@ files:
|
|
157
157
|
- lib/install/config/webpacker.yml
|
158
158
|
- lib/install/package.json
|
159
159
|
- lib/install/template.rb
|
160
|
-
- lib/shakapacker/utils/
|
160
|
+
- lib/shakapacker/utils/misc.rb
|
161
161
|
- lib/shakapacker/utils/version_syntax_converter.rb
|
162
162
|
- lib/tasks/webpacker.rake
|
163
163
|
- lib/tasks/webpacker/binstubs.rake
|
@@ -268,7 +268,7 @@ homepage: https://github.com/shakacode/shakapacker
|
|
268
268
|
licenses:
|
269
269
|
- MIT
|
270
270
|
metadata:
|
271
|
-
source_code_uri: https://github.com/shakacode/shakapacker/tree/v6.0.0-rc.
|
271
|
+
source_code_uri: https://github.com/shakacode/shakapacker/tree/v6.0.0-rc.12
|
272
272
|
post_install_message:
|
273
273
|
rdoc_options: []
|
274
274
|
require_paths:
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "English"
|
4
|
-
module Shakapacker
|
5
|
-
module Utils
|
6
|
-
module GitUtils
|
7
|
-
def self.uncommitted_changes?(message_handler)
|
8
|
-
return false if ENV["COVERAGE"] == "true"
|
9
|
-
|
10
|
-
status = `git status --porcelain`
|
11
|
-
return false if $CHILD_STATUS.success? && status.empty?
|
12
|
-
|
13
|
-
error = if $CHILD_STATUS.success?
|
14
|
-
"You have uncommitted code. Please commit or stash your changes before continuing"
|
15
|
-
else
|
16
|
-
"You do not have Git installed. Please install Git, and commit your changes before continuing"
|
17
|
-
end
|
18
|
-
message_handler.add_error(error)
|
19
|
-
true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|