shakapacker 9.3.0.beta.7 → 9.3.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 +4 -4
- data/.claude/commands/update-changelog.md +224 -0
- data/.github/actionlint-matcher.json +17 -0
- data/.github/workflows/dummy.yml +9 -0
- data/.github/workflows/generator.yml +13 -0
- data/.github/workflows/node.yml +83 -0
- data/.github/workflows/ruby.yml +11 -0
- data/.github/workflows/test-bundlers.yml +10 -0
- data/CHANGELOG.md +55 -111
- data/CLAUDE.md +6 -10
- data/CONTRIBUTING.md +57 -0
- data/Gemfile.lock +1 -1
- data/README.md +84 -8
- data/docs/api-reference.md +519 -0
- data/docs/configuration.md +38 -4
- data/docs/css-modules-export-mode.md +40 -6
- data/docs/rspack_migration_guide.md +238 -2
- data/docs/transpiler-migration.md +12 -9
- data/docs/troubleshooting.md +21 -21
- data/docs/using_swc_loader.md +13 -10
- data/docs/v9_upgrade.md +11 -2
- data/eslint.config.fast.js +128 -8
- data/eslint.config.js +89 -33
- data/knip.ts +8 -1
- data/lib/install/config/shakapacker.yml +20 -7
- data/lib/shakapacker/configuration.rb +274 -8
- data/lib/shakapacker/dev_server.rb +88 -1
- data/lib/shakapacker/dev_server_runner.rb +4 -0
- data/lib/shakapacker/doctor.rb +5 -5
- data/lib/shakapacker/instance.rb +85 -1
- data/lib/shakapacker/manifest.rb +85 -11
- data/lib/shakapacker/version.rb +1 -1
- data/lib/shakapacker.rb +143 -3
- data/lib/tasks/shakapacker/doctor.rake +1 -1
- data/lib/tasks/shakapacker/export_bundler_config.rake +4 -4
- data/package/config.ts +2 -4
- data/package/configExporter/buildValidator.ts +53 -29
- data/package/configExporter/cli.ts +106 -76
- data/package/configExporter/configFile.ts +33 -26
- data/package/configExporter/types.ts +64 -0
- data/package/configExporter/yamlSerializer.ts +118 -43
- data/package/dev_server.ts +3 -2
- data/package/env.ts +2 -2
- data/package/environments/__type-tests__/rspack-plugin-compatibility.ts +6 -6
- data/package/environments/base.ts +6 -6
- data/package/environments/development.ts +7 -9
- data/package/environments/production.ts +7 -8
- data/package/environments/test.ts +4 -2
- data/package/esbuild/index.ts +0 -2
- data/package/index.d.ts +1 -0
- data/package/index.d.ts.template +1 -0
- data/package/index.ts +28 -5
- data/package/loaders.d.ts +2 -2
- data/package/optimization/webpack.ts +29 -31
- data/package/plugins/rspack.ts +3 -1
- data/package/plugins/webpack.ts +5 -3
- data/package/rspack/index.ts +5 -4
- data/package/rules/file.ts +2 -1
- data/package/rules/jscommon.ts +1 -0
- data/package/rules/raw.ts +3 -1
- data/package/rules/rspack.ts +0 -2
- data/package/rules/sass.ts +0 -2
- data/package/rules/webpack.ts +0 -1
- data/package/swc/index.ts +0 -2
- data/package/types.ts +8 -11
- data/package/utils/debug.ts +0 -4
- data/package/utils/getStyleRule.ts +17 -9
- data/package/utils/helpers.ts +8 -4
- data/package/utils/pathValidation.ts +78 -18
- data/package/utils/requireOrError.ts +14 -5
- data/package/utils/typeGuards.ts +43 -46
- data/package/webpack-types.d.ts +2 -2
- data/package/webpackDevServerConfig.ts +5 -4
- data/package.json +2 -3
- data/test/package/configExporter/cli.test.js +440 -0
- data/test/package/configExporter/types.test.js +163 -0
- data/test/package/configExporter.test.js +264 -0
- data/test/package/transpiler-defaults.test.js +42 -0
- data/test/package/yamlSerializer.test.js +204 -0
- data/test/typescript/pathValidation.test.js +44 -0
- data/test/typescript/requireOrError.test.js +49 -0
- data/yarn.lock +0 -32
- metadata +14 -5
- data/.eslintrc.fast.js +0 -40
- data/.eslintrc.js +0 -84
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: 9.3.
|
|
4
|
+
version: 9.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -131,13 +131,13 @@ executables: []
|
|
|
131
131
|
extensions: []
|
|
132
132
|
extra_rdoc_files: []
|
|
133
133
|
files:
|
|
134
|
-
- ".
|
|
135
|
-
- ".eslintrc.js"
|
|
134
|
+
- ".claude/commands/update-changelog.md"
|
|
136
135
|
- ".github/FUNDING.yml"
|
|
137
136
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
138
137
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
139
138
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
140
139
|
- ".github/STATUS.md"
|
|
140
|
+
- ".github/actionlint-matcher.json"
|
|
141
141
|
- ".github/workflows/claude-code-review.yml"
|
|
142
142
|
- ".github/workflows/claude.yml"
|
|
143
143
|
- ".github/workflows/dummy.yml"
|
|
@@ -173,6 +173,7 @@ files:
|
|
|
173
173
|
- conductor.json
|
|
174
174
|
- config/README.md
|
|
175
175
|
- config/shakapacker.yml
|
|
176
|
+
- docs/api-reference.md
|
|
176
177
|
- docs/cdn_setup.md
|
|
177
178
|
- docs/common-upgrades.md
|
|
178
179
|
- docs/configuration.md
|
|
@@ -346,6 +347,8 @@ files:
|
|
|
346
347
|
- test/helpers.js
|
|
347
348
|
- test/package/config.test.js
|
|
348
349
|
- test/package/configExporter.test.js
|
|
350
|
+
- test/package/configExporter/cli.test.js
|
|
351
|
+
- test/package/configExporter/types.test.js
|
|
349
352
|
- test/package/dev_server.test.js
|
|
350
353
|
- test/package/development.test.js
|
|
351
354
|
- test/package/env.test.js
|
|
@@ -368,12 +371,14 @@ files:
|
|
|
368
371
|
- test/package/staging.test.js
|
|
369
372
|
- test/package/test.test.js
|
|
370
373
|
- test/package/transpiler-defaults.test.js
|
|
374
|
+
- test/package/yamlSerializer.test.js
|
|
371
375
|
- test/peer-dependencies.sh
|
|
372
376
|
- test/resolver.js
|
|
373
377
|
- test/scripts/remove-use-strict.test.js
|
|
374
378
|
- test/typescript/build.test.js
|
|
375
379
|
- test/typescript/environments.test.js
|
|
376
380
|
- test/typescript/pathValidation.test.js
|
|
381
|
+
- test/typescript/requireOrError.test.js
|
|
377
382
|
- test/typescript/securityValidation.test.js
|
|
378
383
|
- tools/README.md
|
|
379
384
|
- tools/css-modules-v9-codemod.js
|
|
@@ -384,7 +389,7 @@ homepage: https://github.com/shakacode/shakapacker
|
|
|
384
389
|
licenses:
|
|
385
390
|
- MIT
|
|
386
391
|
metadata:
|
|
387
|
-
source_code_uri: https://github.com/shakacode/shakapacker/tree/v9.3.
|
|
392
|
+
source_code_uri: https://github.com/shakacode/shakapacker/tree/v9.3.1
|
|
388
393
|
rdoc_options: []
|
|
389
394
|
require_paths:
|
|
390
395
|
- lib
|
|
@@ -399,7 +404,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
399
404
|
- !ruby/object:Gem::Version
|
|
400
405
|
version: '0'
|
|
401
406
|
requirements: []
|
|
402
|
-
rubygems_version: 3.
|
|
407
|
+
rubygems_version: 3.7.2
|
|
403
408
|
specification_version: 4
|
|
404
409
|
summary: Use webpack to manage app-like JavaScript modules in Rails
|
|
405
410
|
test_files:
|
|
@@ -409,6 +414,8 @@ test_files:
|
|
|
409
414
|
- test/helpers.js
|
|
410
415
|
- test/package/config.test.js
|
|
411
416
|
- test/package/configExporter.test.js
|
|
417
|
+
- test/package/configExporter/cli.test.js
|
|
418
|
+
- test/package/configExporter/types.test.js
|
|
412
419
|
- test/package/dev_server.test.js
|
|
413
420
|
- test/package/development.test.js
|
|
414
421
|
- test/package/env.test.js
|
|
@@ -431,10 +438,12 @@ test_files:
|
|
|
431
438
|
- test/package/staging.test.js
|
|
432
439
|
- test/package/test.test.js
|
|
433
440
|
- test/package/transpiler-defaults.test.js
|
|
441
|
+
- test/package/yamlSerializer.test.js
|
|
434
442
|
- test/peer-dependencies.sh
|
|
435
443
|
- test/resolver.js
|
|
436
444
|
- test/scripts/remove-use-strict.test.js
|
|
437
445
|
- test/typescript/build.test.js
|
|
438
446
|
- test/typescript/environments.test.js
|
|
439
447
|
- test/typescript/pathValidation.test.js
|
|
448
|
+
- test/typescript/requireOrError.test.js
|
|
440
449
|
- test/typescript/securityValidation.test.js
|
data/.eslintrc.fast.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// Fast ESLint config for quick development feedback
|
|
2
|
-
// Skips type-aware rules that require TypeScript compilation
|
|
3
|
-
|
|
4
|
-
const baseConfig = require("./.eslintrc.js")
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
...baseConfig,
|
|
8
|
-
overrides: [
|
|
9
|
-
...baseConfig.overrides.filter((o) => !o.files.includes("**/*.{ts,tsx}")),
|
|
10
|
-
{
|
|
11
|
-
files: ["**/*.{ts,tsx}"],
|
|
12
|
-
parser: "@typescript-eslint/parser",
|
|
13
|
-
parserOptions: {
|
|
14
|
-
// No project specified - disables type-aware linting
|
|
15
|
-
ecmaVersion: 2020,
|
|
16
|
-
sourceType: "module"
|
|
17
|
-
},
|
|
18
|
-
extends: [
|
|
19
|
-
"plugin:@typescript-eslint/recommended",
|
|
20
|
-
// Skip the "recommended-requiring-type-checking" preset
|
|
21
|
-
"plugin:prettier/recommended"
|
|
22
|
-
],
|
|
23
|
-
plugins: ["@typescript-eslint"],
|
|
24
|
-
rules: {
|
|
25
|
-
// Same rules as main config minus type-aware ones
|
|
26
|
-
"import/no-unresolved": "off",
|
|
27
|
-
"import/no-extraneous-dependencies": "off",
|
|
28
|
-
"import/extensions": "off",
|
|
29
|
-
"no-use-before-define": "off",
|
|
30
|
-
"@typescript-eslint/no-use-before-define": ["error"],
|
|
31
|
-
"@typescript-eslint/no-unused-vars": [
|
|
32
|
-
"error",
|
|
33
|
-
{ argsIgnorePattern: "^_" }
|
|
34
|
-
],
|
|
35
|
-
"@typescript-eslint/no-explicit-any": "error",
|
|
36
|
-
"@typescript-eslint/explicit-module-boundary-types": "off"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
data/.eslintrc.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true, // Prevent ESLint from looking in parent directories
|
|
3
|
-
extends: ["airbnb", "plugin:prettier/recommended"],
|
|
4
|
-
rules: {
|
|
5
|
-
// Webpack handles module resolution, not ESLint
|
|
6
|
-
"import/no-unresolved": "off",
|
|
7
|
-
// Allow importing devDependencies in config/test files
|
|
8
|
-
"import/no-extraneous-dependencies": "off",
|
|
9
|
-
// TypeScript handles extensions, not needed for JS imports
|
|
10
|
-
"import/extensions": "off",
|
|
11
|
-
indent: ["error", 2]
|
|
12
|
-
},
|
|
13
|
-
settings: {
|
|
14
|
-
react: {
|
|
15
|
-
// Suppress "react package not installed" warning
|
|
16
|
-
// This project doesn't use React but airbnb config requires react-plugin
|
|
17
|
-
version: "999.999.999"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
env: {
|
|
21
|
-
browser: true,
|
|
22
|
-
node: true
|
|
23
|
-
},
|
|
24
|
-
overrides: [
|
|
25
|
-
{
|
|
26
|
-
files: ["test/**"],
|
|
27
|
-
extends: ["plugin:jest/recommended", "plugin:jest/style"],
|
|
28
|
-
rules: {
|
|
29
|
-
"global-require": "off",
|
|
30
|
-
"jest/prefer-called-with": "error",
|
|
31
|
-
"jest/no-conditional-in-test": "error",
|
|
32
|
-
"jest/no-test-return-statement": "error",
|
|
33
|
-
"jest/prefer-expect-resolves": "error",
|
|
34
|
-
"jest/require-to-throw-message": "error",
|
|
35
|
-
"jest/require-top-level-describe": "error",
|
|
36
|
-
"jest/prefer-hooks-on-top": "error",
|
|
37
|
-
"jest/prefer-lowercase-title": [
|
|
38
|
-
"error",
|
|
39
|
-
{ ignoreTopLevelDescribe: true }
|
|
40
|
-
],
|
|
41
|
-
"jest/prefer-spy-on": "error",
|
|
42
|
-
"jest/prefer-strict-equal": "error",
|
|
43
|
-
"jest/prefer-todo": "error"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
files: ["**/*.{ts,tsx}"],
|
|
48
|
-
parser: "@typescript-eslint/parser",
|
|
49
|
-
parserOptions: {
|
|
50
|
-
// Enables type-aware linting for better type safety
|
|
51
|
-
// Note: This can slow down linting on large codebases
|
|
52
|
-
// Consider using --cache flag with ESLint if performance degrades
|
|
53
|
-
project: "./tsconfig.eslint.json",
|
|
54
|
-
tsconfigRootDir: __dirname
|
|
55
|
-
},
|
|
56
|
-
extends: [
|
|
57
|
-
"plugin:@typescript-eslint/recommended",
|
|
58
|
-
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
59
|
-
"plugin:prettier/recommended"
|
|
60
|
-
],
|
|
61
|
-
plugins: ["@typescript-eslint"],
|
|
62
|
-
rules: {
|
|
63
|
-
// TypeScript compiler handles module resolution
|
|
64
|
-
"import/no-unresolved": "off",
|
|
65
|
-
// Allow importing devDependencies in TypeScript files
|
|
66
|
-
"import/no-extraneous-dependencies": "off",
|
|
67
|
-
// TypeScript handles file extensions via moduleResolution
|
|
68
|
-
"import/extensions": "off",
|
|
69
|
-
// Disable base rule in favor of TypeScript version
|
|
70
|
-
"no-use-before-define": "off",
|
|
71
|
-
"@typescript-eslint/no-use-before-define": ["error"],
|
|
72
|
-
// Allow unused vars if they start with underscore (convention for ignored params)
|
|
73
|
-
"@typescript-eslint/no-unused-vars": [
|
|
74
|
-
"error",
|
|
75
|
-
{ argsIgnorePattern: "^_" }
|
|
76
|
-
],
|
|
77
|
-
// Strict: no 'any' types allowed - use 'unknown' or specific types instead
|
|
78
|
-
"@typescript-eslint/no-explicit-any": "error",
|
|
79
|
-
// Allow implicit return types - TypeScript can infer them
|
|
80
|
-
"@typescript-eslint/explicit-module-boundary-types": "off"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
}
|