webpacker-pnpm 1.2.1 → 1.2.3
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 +4 -4
- data/.gitattributes +0 -0
- data/.github/FUNDING.yml +3 -0
- data/.github/workflows/ci.yaml +51 -0
- data/.gitignore +3 -5
- data/.rubocop.yml +23 -5
- data/CHANGELOG.md +76 -63
- data/Gemfile +8 -8
- data/LICENSE +29 -0
- data/README.md +44 -37
- data/bin/console +15 -15
- data/bin/setup +8 -8
- data/gemfiles/Gemfile-rails.5.2.x +0 -0
- data/gemfiles/Gemfile-rails.6.0.x +0 -0
- data/lib/webpacker/pnpm/patches.rb +83 -53
- data/lib/webpacker/pnpm/railtie.rb +34 -33
- data/lib/webpacker/pnpm/version.rb +9 -9
- data/lib/webpacker/pnpm.rb +5 -5
- data/lib/webpacker/tasks/check_pnpm.rake +42 -42
- data/lib/webpacker/tasks/env.rake +22 -22
- data/lib/webpacker/tasks/pnpm_install.rake +14 -14
- data/test_app/.gitignore +6 -0
- data/test_app/Gemfile +5 -0
- data/test_app/Gemfile.lock +175 -0
- data/{Rakefile → test_app/Rakefile} +12 -11
- data/test_app/app/javascript/packs/application.js +10 -0
- data/{test/test_app → test_app}/app/javascript/packs/multi_entry.css +3 -3
- data/{test/test_app → test_app}/app/javascript/packs/multi_entry.js +4 -4
- data/{test/test_app → test_app}/bin/rails +0 -0
- data/{test/test_app → test_app}/bin/rake +0 -0
- data/{test/test_app → test_app}/bin/setup +0 -0
- data/{test/test_app → test_app}/bin/webpack +15 -15
- data/{test/test_app → test_app}/bin/webpack-dev-server +15 -15
- data/{test/test_app → test_app}/config/application.rb +13 -13
- data/{test/test_app → test_app}/config/boot.rb +5 -5
- data/{test/test_app → test_app}/config/environment.rb +6 -6
- data/{test/test_app → test_app}/config/webpack/development.js +0 -0
- data/{test/test_app → test_app}/config/webpack/environment.js +0 -0
- data/test_app/config/webpack/production.js +0 -0
- data/{test/test_app → test_app}/config/webpacker.yml +0 -0
- data/{test/test_app → test_app}/config/webpacker_public_root.yml +19 -19
- data/{test/test_app → test_app}/config.ru +7 -7
- data/{test/test_app → test_app}/package.json +3 -1
- data/test_app/pnpm-lock.yaml +6756 -0
- data/{test/test_app → test_app}/public/packs/manifest.json +31 -31
- data/test_app/src/index.js +0 -0
- data/{test → test_app/test}/rake_tasks_test.rb +108 -97
- data/{test → test_app/test}/test_helper.rb +61 -61
- data/webpacker-pnpm.gemspec +44 -44
- metadata +41 -59
- data/.travis.yml +0 -42
- data/test/test_app/.gitignore +0 -7
- data/test/test_app/Rakefile +0 -5
- data/test/test_app/app/javascript/packs/application.js +0 -10
- data/test/test_app/pnpm-lock.yaml +0 -20
@@ -1,31 +1,31 @@
|
|
1
|
-
{
|
2
|
-
"bootstrap.css": "/packs/bootstrap-c38deda30895059837cf.css",
|
3
|
-
"application.css": "/packs/application-dd6b1cd38bfa093df600.css",
|
4
|
-
"bootstrap.js": "/packs/bootstrap-300631c4f0e0f9c865bc.js",
|
5
|
-
"application.js": "/packs/application-k344a6d59eef8632c9d1.js",
|
6
|
-
"application.png": "/packs/application-k344a6d59eef8632c9d1.png",
|
7
|
-
"fonts/fa-regular-400.woff2": "/packs/fonts/fa-regular-400-944fb546bd7018b07190a32244f67dc9.woff2",
|
8
|
-
"media/images/image.jpg": "/packs/media/images/image-c38deda30895059837cf.jpg",
|
9
|
-
"media/images/nested/image.jpg": "/packs/media/images/nested/image-c38deda30895059837cf.jpg",
|
10
|
-
"media/images/mb-icon.png": "/packs/media/images/mb-icon-c38deda30895059837cf.png",
|
11
|
-
"media/images/nested/mb-icon.png": "/packs/media/images/nested/mb-icon-c38deda30895059837cf.png",
|
12
|
-
"entrypoints": {
|
13
|
-
"application": {
|
14
|
-
"js": [
|
15
|
-
"/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js",
|
16
|
-
"/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js",
|
17
|
-
"/packs/application-k344a6d59eef8632c9d1.js"
|
18
|
-
],
|
19
|
-
"css": [
|
20
|
-
"/packs/1-c20632e7baf2c81200d3.chunk.css",
|
21
|
-
"/packs/application-k344a6d59eef8632c9d1.chunk.css"
|
22
|
-
]
|
23
|
-
},
|
24
|
-
"hello_stimulus": {
|
25
|
-
"css": [
|
26
|
-
"/packs/1-c20632e7baf2c81200d3.chunk.css",
|
27
|
-
"/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css"
|
28
|
-
]
|
29
|
-
}
|
30
|
-
}
|
31
|
-
}
|
1
|
+
{
|
2
|
+
"bootstrap.css": "/packs/bootstrap-c38deda30895059837cf.css",
|
3
|
+
"application.css": "/packs/application-dd6b1cd38bfa093df600.css",
|
4
|
+
"bootstrap.js": "/packs/bootstrap-300631c4f0e0f9c865bc.js",
|
5
|
+
"application.js": "/packs/application-k344a6d59eef8632c9d1.js",
|
6
|
+
"application.png": "/packs/application-k344a6d59eef8632c9d1.png",
|
7
|
+
"fonts/fa-regular-400.woff2": "/packs/fonts/fa-regular-400-944fb546bd7018b07190a32244f67dc9.woff2",
|
8
|
+
"media/images/image.jpg": "/packs/media/images/image-c38deda30895059837cf.jpg",
|
9
|
+
"media/images/nested/image.jpg": "/packs/media/images/nested/image-c38deda30895059837cf.jpg",
|
10
|
+
"media/images/mb-icon.png": "/packs/media/images/mb-icon-c38deda30895059837cf.png",
|
11
|
+
"media/images/nested/mb-icon.png": "/packs/media/images/nested/mb-icon-c38deda30895059837cf.png",
|
12
|
+
"entrypoints": {
|
13
|
+
"application": {
|
14
|
+
"js": [
|
15
|
+
"/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js",
|
16
|
+
"/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js",
|
17
|
+
"/packs/application-k344a6d59eef8632c9d1.js"
|
18
|
+
],
|
19
|
+
"css": [
|
20
|
+
"/packs/1-c20632e7baf2c81200d3.chunk.css",
|
21
|
+
"/packs/application-k344a6d59eef8632c9d1.chunk.css"
|
22
|
+
]
|
23
|
+
},
|
24
|
+
"hello_stimulus": {
|
25
|
+
"css": [
|
26
|
+
"/packs/1-c20632e7baf2c81200d3.chunk.css",
|
27
|
+
"/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css"
|
28
|
+
]
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
File without changes
|
@@ -1,97 +1,108 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "test_helper"
|
4
|
-
|
5
|
-
module Webpacker
|
6
|
-
module PNPM
|
7
|
-
class RakeTasksTest < Test
|
8
|
-
def test_rake_tasks
|
9
|
-
output = chdir_concurrent(test_path, "bundle exec rake --tasks")
|
10
|
-
assert_includes(output, "webpacker:check_pnpm")
|
11
|
-
assert_includes(output, "webpacker:pnpm_install")
|
12
|
-
assert_includes(output, "webpacker:env")
|
13
|
-
|
14
|
-
assert_not_includes(output, "webpacker:check_yarn")
|
15
|
-
assert_not_includes(output, "webpacker:yarn_install")
|
16
|
-
assert_not_includes(output, "yarn:install")
|
17
|
-
assert_not_includes(output, "webpacker:info")
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_check_pnpm_version
|
21
|
-
output = chdir_concurrent(test_path, "rake webpacker:check_pnpm")
|
22
|
-
assert_not_includes(output, "pnpm is not installed")
|
23
|
-
assert_not_includes(output, "Webpacker requires pnpm")
|
24
|
-
|
25
|
-
assert_includes(output, "Verifying pnpm version...")
|
26
|
-
end
|
27
|
-
|
28
|
-
def test_override_check_yarn_version
|
29
|
-
output = chdir_concurrent(test_path, "rake webpacker:check_yarn")
|
30
|
-
assert_not_includes(output, "pnpm is not installed")
|
31
|
-
assert_not_includes(output, "Webpacker requires pnpm")
|
32
|
-
|
33
|
-
assert_includes(output, "Verifying pnpm version...")
|
34
|
-
end
|
35
|
-
|
36
|
-
def test_pnpm_install_in_production_env
|
37
|
-
cmd = "bundle exec rake webpacker:pnpm_install"
|
38
|
-
chdir_concurrent(test_path, cmd, { "NODE_ENV": "production" },
|
39
|
-
{ isolated: true }) do |temp|
|
40
|
-
assert_not_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
41
|
-
Expected only production dependencies to be installed
|
42
|
-
HEREDOC
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def test_pnpm_install_in_test_env
|
47
|
-
assert_includes(test_app_dev_dependencies, "right-pad")
|
48
|
-
|
49
|
-
cmd = "bundle exec rake webpacker:pnpm_install"
|
50
|
-
chdir_concurrent(test_path, cmd, { "NODE_ENV": "test" },
|
51
|
-
{ isolated: true }) do |temp|
|
52
|
-
assert_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
53
|
-
Expected dev dependencies to be installed
|
54
|
-
HEREDOC
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
def test_yarn_install_alias_in_production_env
|
59
|
-
cmd = "bundle exec rake webpacker:yarn_install"
|
60
|
-
chdir_concurrent(test_path, cmd, { "NODE_ENV": "production" },
|
61
|
-
{ isolated: true }) do |temp|
|
62
|
-
assert_not_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
63
|
-
Expected only production dependencies to be installed
|
64
|
-
HEREDOC
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_yarn_install_alias_in_test_env
|
69
|
-
assert_includes(test_app_dev_dependencies, "right-pad")
|
70
|
-
|
71
|
-
cmd = "bundle exec rake webpacker:yarn_install"
|
72
|
-
chdir_concurrent(test_path, cmd, { "NODE_ENV": "test" },
|
73
|
-
{ isolated: true }) do |temp|
|
74
|
-
assert_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
75
|
-
Expected dev dependencies to be installed
|
76
|
-
HEREDOC
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
end
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "test_helper"
|
4
|
+
|
5
|
+
module Webpacker
|
6
|
+
module PNPM
|
7
|
+
class RakeTasksTest < Test
|
8
|
+
def test_rake_tasks
|
9
|
+
output = chdir_concurrent(test_path, "bundle exec rake --tasks")
|
10
|
+
assert_includes(output, "webpacker:check_pnpm")
|
11
|
+
assert_includes(output, "webpacker:pnpm_install")
|
12
|
+
assert_includes(output, "webpacker:env")
|
13
|
+
|
14
|
+
assert_not_includes(output, "webpacker:check_yarn")
|
15
|
+
assert_not_includes(output, "webpacker:yarn_install")
|
16
|
+
assert_not_includes(output, "yarn:install")
|
17
|
+
assert_not_includes(output, "webpacker:info")
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_check_pnpm_version
|
21
|
+
output = chdir_concurrent(test_path, "bundle exec rake webpacker:check_pnpm")
|
22
|
+
assert_not_includes(output, "pnpm is not installed")
|
23
|
+
assert_not_includes(output, "Webpacker requires pnpm")
|
24
|
+
|
25
|
+
assert_includes(output, "Verifying pnpm version...")
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_override_check_yarn_version
|
29
|
+
output = chdir_concurrent(test_path, "bundle exec rake webpacker:check_yarn")
|
30
|
+
assert_not_includes(output, "pnpm is not installed")
|
31
|
+
assert_not_includes(output, "Webpacker requires pnpm")
|
32
|
+
|
33
|
+
assert_includes(output, "Verifying pnpm version...")
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_pnpm_install_in_production_env
|
37
|
+
cmd = "bundle exec rake webpacker:pnpm_install"
|
38
|
+
chdir_concurrent(test_path, cmd, { "NODE_ENV": "production" },
|
39
|
+
{ isolated: true }) do |temp|
|
40
|
+
assert_not_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
41
|
+
Expected only production dependencies to be installed
|
42
|
+
HEREDOC
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_pnpm_install_in_test_env
|
47
|
+
assert_includes(test_app_dev_dependencies, "right-pad")
|
48
|
+
|
49
|
+
cmd = "bundle exec rake webpacker:pnpm_install"
|
50
|
+
chdir_concurrent(test_path, cmd, { "NODE_ENV": "test" },
|
51
|
+
{ isolated: true }) do |temp|
|
52
|
+
assert_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
53
|
+
Expected dev dependencies to be installed
|
54
|
+
HEREDOC
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_yarn_install_alias_in_production_env
|
59
|
+
cmd = "bundle exec rake webpacker:yarn_install"
|
60
|
+
chdir_concurrent(test_path, cmd, { "NODE_ENV": "production" },
|
61
|
+
{ isolated: true }) do |temp|
|
62
|
+
assert_not_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
63
|
+
Expected only production dependencies to be installed
|
64
|
+
HEREDOC
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_yarn_install_alias_in_test_env
|
69
|
+
assert_includes(test_app_dev_dependencies, "right-pad")
|
70
|
+
|
71
|
+
cmd = "bundle exec rake webpacker:yarn_install"
|
72
|
+
chdir_concurrent(test_path, cmd, { "NODE_ENV": "test" },
|
73
|
+
{ isolated: true }) do |temp|
|
74
|
+
assert_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
75
|
+
Expected dev dependencies to be installed
|
76
|
+
HEREDOC
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def test_asset_precompile
|
81
|
+
cmd = "bundle exec rake assets:precompile"
|
82
|
+
output = chdir_concurrent(test_path, cmd, { "NODE_ENV": "production" },
|
83
|
+
{ isolated: true })
|
84
|
+
|
85
|
+
assert_includes(output, "Compiling...")
|
86
|
+
|
87
|
+
assert_not_includes(output, "Compilation failed:")
|
88
|
+
assert_includes(output, "Compiled all packs in")
|
89
|
+
end
|
90
|
+
|
91
|
+
private
|
92
|
+
|
93
|
+
def test_path
|
94
|
+
File.expand_path(".")
|
95
|
+
end
|
96
|
+
|
97
|
+
def test_app_dev_dependencies
|
98
|
+
package_json = File.expand_path("package.json", test_path)
|
99
|
+
JSON.parse(File.read(package_json))["devDependencies"]
|
100
|
+
end
|
101
|
+
|
102
|
+
def installed_node_modules(dir)
|
103
|
+
node_modules_path = File.expand_path("node_modules", dir)
|
104
|
+
Dir.entries(node_modules_path)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -1,61 +1,61 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails"
|
4
|
-
require "rails/test_help"
|
5
|
-
require "etc"
|
6
|
-
require "fileutils"
|
7
|
-
require "open3"
|
8
|
-
|
9
|
-
require_relative "
|
10
|
-
|
11
|
-
Rails.env = "production"
|
12
|
-
Webpacker.instance = ::Webpacker::Instance.new
|
13
|
-
|
14
|
-
module Webpacker
|
15
|
-
module PNPM
|
16
|
-
class Test < ActiveSupport::TestCase
|
17
|
-
# force test parallelization - this is not about test speed, it is about
|
18
|
-
# maximizing the likelihood of having tests fail by providing isolated
|
19
|
-
# execution threads. manually specify the number of workers, as by default
|
20
|
-
# Rails uses the number of physical, not logical, cores. Additionally,
|
21
|
-
# spawn threads rather than fork processes as Rails' DRb implementation
|
22
|
-
# only supports UNIX systems
|
23
|
-
Minitest.parallel_executor = Minitest::Parallel::Executor.new(Etc.nprocessors)
|
24
|
-
parallelize_me!
|
25
|
-
|
26
|
-
protected
|
27
|
-
|
28
|
-
# concurrent scoped chdir calls are not supported, as they can cause
|
29
|
-
# unforeseen and unpredictable bugs. instead, allow copying the desired
|
30
|
-
# directory to a temp directory before performing possible filesystem
|
31
|
-
# manipulations. opts are passed through to Open3::capture2e
|
32
|
-
def chdir_concurrent(dir, cmd, env = {}, opts = {})
|
33
|
-
# Process::spawn requires an env hash of strings
|
34
|
-
env.stringify_keys!
|
35
|
-
env.transform_values!(&:to_s)
|
36
|
-
|
37
|
-
env = ENV.to_h.merge(env)
|
38
|
-
isolated = opts.delete(:isolated)
|
39
|
-
output = nil
|
40
|
-
|
41
|
-
begin
|
42
|
-
# if we're want an isolated environment, copy the directory contents to
|
43
|
-
# a new temporary directory and change the working directory to it
|
44
|
-
if isolated
|
45
|
-
files = Dir[File.join(dir, "*")].reject { |f| f.include?("node_modules") }
|
46
|
-
dir = Dir.mktmpdir
|
47
|
-
FileUtils.cp_r(files, dir)
|
48
|
-
end
|
49
|
-
|
50
|
-
output, = Open3.capture2e(env, "cd #{dir} && #{cmd}", opts)
|
51
|
-
yield(dir) if block_given?
|
52
|
-
ensure
|
53
|
-
# make sure we remove the generated temp directory
|
54
|
-
FileUtils.remove_entry_secure(dir) if isolated
|
55
|
-
end
|
56
|
-
|
57
|
-
output
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails"
|
4
|
+
require "rails/test_help"
|
5
|
+
require "etc"
|
6
|
+
require "fileutils"
|
7
|
+
require "open3"
|
8
|
+
|
9
|
+
require_relative "../config/environment"
|
10
|
+
|
11
|
+
Rails.env = "production"
|
12
|
+
Webpacker.instance = ::Webpacker::Instance.new
|
13
|
+
|
14
|
+
module Webpacker
|
15
|
+
module PNPM
|
16
|
+
class Test < ActiveSupport::TestCase
|
17
|
+
# force test parallelization - this is not about test speed, it is about
|
18
|
+
# maximizing the likelihood of having tests fail by providing isolated
|
19
|
+
# execution threads. manually specify the number of workers, as by default
|
20
|
+
# Rails uses the number of physical, not logical, cores. Additionally,
|
21
|
+
# spawn threads rather than fork processes as Rails' DRb implementation
|
22
|
+
# only supports UNIX systems
|
23
|
+
Minitest.parallel_executor = Minitest::Parallel::Executor.new(Etc.nprocessors)
|
24
|
+
parallelize_me!
|
25
|
+
|
26
|
+
protected
|
27
|
+
|
28
|
+
# concurrent scoped chdir calls are not supported, as they can cause
|
29
|
+
# unforeseen and unpredictable bugs. instead, allow copying the desired
|
30
|
+
# directory to a temp directory before performing possible filesystem
|
31
|
+
# manipulations. opts are passed through to Open3::capture2e
|
32
|
+
def chdir_concurrent(dir, cmd, env = {}, opts = {})
|
33
|
+
# Process::spawn requires an env hash of strings
|
34
|
+
env.stringify_keys!
|
35
|
+
env.transform_values!(&:to_s)
|
36
|
+
|
37
|
+
env = ENV.to_h.merge(env)
|
38
|
+
isolated = opts.delete(:isolated)
|
39
|
+
output = nil
|
40
|
+
|
41
|
+
begin
|
42
|
+
# if we're want an isolated environment, copy the directory contents to
|
43
|
+
# a new temporary directory and change the working directory to it
|
44
|
+
if isolated
|
45
|
+
files = Dir[File.join(dir, "*")].reject { |f| f.include?("node_modules") }
|
46
|
+
dir = Dir.mktmpdir
|
47
|
+
FileUtils.cp_r(files, dir)
|
48
|
+
end
|
49
|
+
|
50
|
+
output, = Open3.capture2e(env, "cd #{dir} && #{cmd}", opts)
|
51
|
+
yield(dir) if block_given?
|
52
|
+
ensure
|
53
|
+
# make sure we remove the generated temp directory
|
54
|
+
FileUtils.remove_entry_secure(dir) if isolated
|
55
|
+
end
|
56
|
+
|
57
|
+
output
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
data/webpacker-pnpm.gemspec
CHANGED
@@ -1,44 +1,44 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path("lib", __dir__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require "webpacker/pnpm/version"
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = "webpacker-pnpm"
|
9
|
-
spec.version = Webpacker::PNPM::VERSION
|
10
|
-
spec.author = "Elias Gabriel"
|
11
|
-
spec.email = "me@eliasfgabriel.com"
|
12
|
-
spec.homepage = "https://github.com/thearchitector/webpacker-pnpm"
|
13
|
-
spec.license = "
|
14
|
-
|
15
|
-
spec.summary = "Replaces Webpacker's Yarn environment with pnpm."
|
16
|
-
spec.description = <<~HEREDOC.gsub(/[[:space:]]+/, " ").strip
|
17
|
-
webpacker-pnpm minimizes dependency hell, improves code quality stability, and
|
18
|
-
reduces node_modules folder sizes by replacing Webpacker's Yarn environment with pnpm.
|
19
|
-
HEREDOC
|
20
|
-
|
21
|
-
spec.metadata = {
|
22
|
-
"homepage_uri" => spec.homepage,
|
23
|
-
"source_code_uri" => "#{spec.homepage}/tree/v#{spec.version}",
|
24
|
-
"changelog_uri" => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
|
25
|
-
"bug_tracker_uri" => "#{spec.homepage}/issues"
|
26
|
-
}
|
27
|
-
|
28
|
-
spec.required_ruby_version = ">= 2.4.0"
|
29
|
-
|
30
|
-
spec.add_dependency "rails", ">= 5.2"
|
31
|
-
spec.add_dependency "rake", ">= 12.3.3"
|
32
|
-
spec.add_dependency "semantic_range", "~> 2.3"
|
33
|
-
spec.add_dependency "webpacker"
|
34
|
-
|
35
|
-
spec.add_development_dependency "minitest", "~> 5.0"
|
36
|
-
spec.add_development_dependency "practical-pig", "~> 1.0"
|
37
|
-
spec.add_development_dependency "rubocop", "~> 0.83.0"
|
38
|
-
spec.add_development_dependency "rubocop-minitest", "~> 0.9"
|
39
|
-
spec.add_development_dependency "rubocop-performance", "~> 1.3"
|
40
|
-
spec.add_development_dependency "rubocop-rails", "~> 2.5"
|
41
|
-
|
42
|
-
spec.files = `git ls-files`.split("\n")
|
43
|
-
spec.test_files = `git ls-files -- test/*`.split("\n")
|
44
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require "webpacker/pnpm/version"
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "webpacker-pnpm"
|
9
|
+
spec.version = Webpacker::PNPM::VERSION
|
10
|
+
spec.author = "Elias Gabriel"
|
11
|
+
spec.email = "me@eliasfgabriel.com"
|
12
|
+
spec.homepage = "https://github.com/thearchitector/webpacker-pnpm"
|
13
|
+
spec.license = "BSD-3-Clause"
|
14
|
+
|
15
|
+
spec.summary = "Replaces Webpacker's Yarn environment with pnpm."
|
16
|
+
spec.description = <<~HEREDOC.gsub(/[[:space:]]+/, " ").strip
|
17
|
+
webpacker-pnpm minimizes dependency hell, improves code quality stability, and
|
18
|
+
reduces node_modules folder sizes by replacing Webpacker's Yarn environment with pnpm.
|
19
|
+
HEREDOC
|
20
|
+
|
21
|
+
spec.metadata = {
|
22
|
+
"homepage_uri" => spec.homepage,
|
23
|
+
"source_code_uri" => "#{spec.homepage}/tree/v#{spec.version}",
|
24
|
+
"changelog_uri" => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
|
25
|
+
"bug_tracker_uri" => "#{spec.homepage}/issues"
|
26
|
+
}
|
27
|
+
|
28
|
+
spec.required_ruby_version = ">= 2.4.0"
|
29
|
+
|
30
|
+
spec.add_dependency "rails", ">= 5.2"
|
31
|
+
spec.add_dependency "rake", ">= 12.3.3"
|
32
|
+
spec.add_dependency "semantic_range", "~> 2.3"
|
33
|
+
spec.add_dependency "webpacker"
|
34
|
+
|
35
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
36
|
+
spec.add_development_dependency "practical-pig", "~> 1.0"
|
37
|
+
spec.add_development_dependency "rubocop", "~> 0.83.0"
|
38
|
+
spec.add_development_dependency "rubocop-minitest", "~> 0.9"
|
39
|
+
spec.add_development_dependency "rubocop-performance", "~> 1.3"
|
40
|
+
spec.add_development_dependency "rubocop-rails", "~> 2.5"
|
41
|
+
|
42
|
+
spec.files = `git ls-files`.split("\n")
|
43
|
+
spec.test_files = `git ls-files -- test/*`.split("\n")
|
44
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpacker-pnpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elias Gabriel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: webpacker
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,13 +159,14 @@ extensions: []
|
|
159
159
|
extra_rdoc_files: []
|
160
160
|
files:
|
161
161
|
- ".gitattributes"
|
162
|
+
- ".github/FUNDING.yml"
|
163
|
+
- ".github/workflows/ci.yaml"
|
162
164
|
- ".gitignore"
|
163
165
|
- ".rubocop.yml"
|
164
|
-
- ".travis.yml"
|
165
166
|
- CHANGELOG.md
|
166
167
|
- Gemfile
|
168
|
+
- LICENSE
|
167
169
|
- README.md
|
168
|
-
- Rakefile
|
169
170
|
- bin/console
|
170
171
|
- bin/setup
|
171
172
|
- gemfiles/Gemfile-rails.5.2.x
|
@@ -177,37 +178,41 @@ files:
|
|
177
178
|
- lib/webpacker/tasks/check_pnpm.rake
|
178
179
|
- lib/webpacker/tasks/env.rake
|
179
180
|
- lib/webpacker/tasks/pnpm_install.rake
|
180
|
-
-
|
181
|
-
-
|
182
|
-
-
|
183
|
-
-
|
184
|
-
-
|
185
|
-
-
|
186
|
-
-
|
187
|
-
-
|
188
|
-
-
|
189
|
-
-
|
190
|
-
-
|
191
|
-
-
|
192
|
-
-
|
193
|
-
-
|
194
|
-
-
|
195
|
-
-
|
196
|
-
-
|
197
|
-
-
|
198
|
-
-
|
199
|
-
-
|
200
|
-
-
|
201
|
-
-
|
202
|
-
-
|
181
|
+
- test_app/.gitignore
|
182
|
+
- test_app/Gemfile
|
183
|
+
- test_app/Gemfile.lock
|
184
|
+
- test_app/Rakefile
|
185
|
+
- test_app/app/javascript/packs/application.js
|
186
|
+
- test_app/app/javascript/packs/multi_entry.css
|
187
|
+
- test_app/app/javascript/packs/multi_entry.js
|
188
|
+
- test_app/bin/rails
|
189
|
+
- test_app/bin/rake
|
190
|
+
- test_app/bin/setup
|
191
|
+
- test_app/bin/webpack
|
192
|
+
- test_app/bin/webpack-dev-server
|
193
|
+
- test_app/config.ru
|
194
|
+
- test_app/config/application.rb
|
195
|
+
- test_app/config/boot.rb
|
196
|
+
- test_app/config/environment.rb
|
197
|
+
- test_app/config/webpack/development.js
|
198
|
+
- test_app/config/webpack/environment.js
|
199
|
+
- test_app/config/webpack/production.js
|
200
|
+
- test_app/config/webpacker.yml
|
201
|
+
- test_app/config/webpacker_public_root.yml
|
202
|
+
- test_app/package.json
|
203
|
+
- test_app/pnpm-lock.yaml
|
204
|
+
- test_app/public/packs/manifest.json
|
205
|
+
- test_app/src/index.js
|
206
|
+
- test_app/test/rake_tasks_test.rb
|
207
|
+
- test_app/test/test_helper.rb
|
203
208
|
- webpacker-pnpm.gemspec
|
204
209
|
homepage: https://github.com/thearchitector/webpacker-pnpm
|
205
210
|
licenses:
|
206
|
-
-
|
211
|
+
- BSD-3-Clause
|
207
212
|
metadata:
|
208
213
|
homepage_uri: https://github.com/thearchitector/webpacker-pnpm
|
209
|
-
source_code_uri: https://github.com/thearchitector/webpacker-pnpm/tree/v1.2.
|
210
|
-
changelog_uri: https://github.com/thearchitector/webpacker-pnpm/blob/v1.2.
|
214
|
+
source_code_uri: https://github.com/thearchitector/webpacker-pnpm/tree/v1.2.3
|
215
|
+
changelog_uri: https://github.com/thearchitector/webpacker-pnpm/blob/v1.2.3/CHANGELOG.md
|
211
216
|
bug_tracker_uri: https://github.com/thearchitector/webpacker-pnpm/issues
|
212
217
|
post_install_message:
|
213
218
|
rdoc_options: []
|
@@ -224,31 +229,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
229
|
- !ruby/object:Gem::Version
|
225
230
|
version: '0'
|
226
231
|
requirements: []
|
227
|
-
rubygems_version: 3.
|
232
|
+
rubygems_version: 3.0.3
|
228
233
|
signing_key:
|
229
234
|
specification_version: 4
|
230
235
|
summary: Replaces Webpacker's Yarn environment with pnpm.
|
231
|
-
test_files:
|
232
|
-
- test/rake_tasks_test.rb
|
233
|
-
- test/test_app/.gitignore
|
234
|
-
- test/test_app/Rakefile
|
235
|
-
- test/test_app/app/javascript/packs/application.js
|
236
|
-
- test/test_app/app/javascript/packs/multi_entry.css
|
237
|
-
- test/test_app/app/javascript/packs/multi_entry.js
|
238
|
-
- test/test_app/bin/rails
|
239
|
-
- test/test_app/bin/rake
|
240
|
-
- test/test_app/bin/setup
|
241
|
-
- test/test_app/bin/webpack
|
242
|
-
- test/test_app/bin/webpack-dev-server
|
243
|
-
- test/test_app/config.ru
|
244
|
-
- test/test_app/config/application.rb
|
245
|
-
- test/test_app/config/boot.rb
|
246
|
-
- test/test_app/config/environment.rb
|
247
|
-
- test/test_app/config/webpack/development.js
|
248
|
-
- test/test_app/config/webpack/environment.js
|
249
|
-
- test/test_app/config/webpacker.yml
|
250
|
-
- test/test_app/config/webpacker_public_root.yml
|
251
|
-
- test/test_app/package.json
|
252
|
-
- test/test_app/pnpm-lock.yaml
|
253
|
-
- test/test_app/public/packs/manifest.json
|
254
|
-
- test/test_helper.rb
|
236
|
+
test_files: []
|