shakapacker 9.3.0.beta.7 → 9.3.0
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/CHANGELOG.md +46 -109
- data/Gemfile.lock +1 -1
- data/README.md +53 -2
- data/docs/configuration.md +28 -0
- data/docs/rspack_migration_guide.md +238 -2
- data/docs/troubleshooting.md +21 -21
- data/eslint.config.fast.js +8 -0
- data/eslint.config.js +47 -10
- data/knip.ts +8 -1
- data/lib/install/config/shakapacker.yml +6 -6
- data/lib/shakapacker/configuration.rb +227 -4
- data/lib/shakapacker/dev_server.rb +88 -1
- data/lib/shakapacker/doctor.rb +4 -4
- 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 +0 -1
- data/package/configExporter/buildValidator.ts +53 -29
- data/package/configExporter/cli.ts +81 -56
- 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 +2 -1
- data/package/env.ts +1 -1
- data/package/environments/base.ts +4 -4
- data/package/environments/development.ts +7 -6
- data/package/environments/production.ts +6 -7
- data/package/environments/test.ts +2 -1
- data/package/index.ts +28 -4
- data/package/loaders.d.ts +2 -2
- data/package/optimization/webpack.ts +29 -31
- data/package/rspack/index.ts +2 -1
- data/package/rules/file.ts +1 -0
- data/package/rules/jscommon.ts +1 -0
- data/package/utils/helpers.ts +0 -1
- data/package/utils/pathValidation.ts +68 -7
- data/package/utils/requireOrError.ts +10 -2
- data/package/utils/typeGuards.ts +43 -46
- data/package/webpack-types.d.ts +2 -2
- data/package/webpackDevServerConfig.ts +1 -0
- 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/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 +11 -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.0
|
|
4
|
+
version: 9.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -131,8 +131,6 @@ executables: []
|
|
|
131
131
|
extensions: []
|
|
132
132
|
extra_rdoc_files: []
|
|
133
133
|
files:
|
|
134
|
-
- ".eslintrc.fast.js"
|
|
135
|
-
- ".eslintrc.js"
|
|
136
134
|
- ".github/FUNDING.yml"
|
|
137
135
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
138
136
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
@@ -346,6 +344,8 @@ files:
|
|
|
346
344
|
- test/helpers.js
|
|
347
345
|
- test/package/config.test.js
|
|
348
346
|
- test/package/configExporter.test.js
|
|
347
|
+
- test/package/configExporter/cli.test.js
|
|
348
|
+
- test/package/configExporter/types.test.js
|
|
349
349
|
- test/package/dev_server.test.js
|
|
350
350
|
- test/package/development.test.js
|
|
351
351
|
- test/package/env.test.js
|
|
@@ -368,12 +368,14 @@ files:
|
|
|
368
368
|
- test/package/staging.test.js
|
|
369
369
|
- test/package/test.test.js
|
|
370
370
|
- test/package/transpiler-defaults.test.js
|
|
371
|
+
- test/package/yamlSerializer.test.js
|
|
371
372
|
- test/peer-dependencies.sh
|
|
372
373
|
- test/resolver.js
|
|
373
374
|
- test/scripts/remove-use-strict.test.js
|
|
374
375
|
- test/typescript/build.test.js
|
|
375
376
|
- test/typescript/environments.test.js
|
|
376
377
|
- test/typescript/pathValidation.test.js
|
|
378
|
+
- test/typescript/requireOrError.test.js
|
|
377
379
|
- test/typescript/securityValidation.test.js
|
|
378
380
|
- tools/README.md
|
|
379
381
|
- tools/css-modules-v9-codemod.js
|
|
@@ -384,7 +386,7 @@ homepage: https://github.com/shakacode/shakapacker
|
|
|
384
386
|
licenses:
|
|
385
387
|
- MIT
|
|
386
388
|
metadata:
|
|
387
|
-
source_code_uri: https://github.com/shakacode/shakapacker/tree/v9.3.0
|
|
389
|
+
source_code_uri: https://github.com/shakacode/shakapacker/tree/v9.3.0
|
|
388
390
|
rdoc_options: []
|
|
389
391
|
require_paths:
|
|
390
392
|
- lib
|
|
@@ -399,7 +401,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
399
401
|
- !ruby/object:Gem::Version
|
|
400
402
|
version: '0'
|
|
401
403
|
requirements: []
|
|
402
|
-
rubygems_version: 3.
|
|
404
|
+
rubygems_version: 3.7.2
|
|
403
405
|
specification_version: 4
|
|
404
406
|
summary: Use webpack to manage app-like JavaScript modules in Rails
|
|
405
407
|
test_files:
|
|
@@ -409,6 +411,8 @@ test_files:
|
|
|
409
411
|
- test/helpers.js
|
|
410
412
|
- test/package/config.test.js
|
|
411
413
|
- test/package/configExporter.test.js
|
|
414
|
+
- test/package/configExporter/cli.test.js
|
|
415
|
+
- test/package/configExporter/types.test.js
|
|
412
416
|
- test/package/dev_server.test.js
|
|
413
417
|
- test/package/development.test.js
|
|
414
418
|
- test/package/env.test.js
|
|
@@ -431,10 +435,12 @@ test_files:
|
|
|
431
435
|
- test/package/staging.test.js
|
|
432
436
|
- test/package/test.test.js
|
|
433
437
|
- test/package/transpiler-defaults.test.js
|
|
438
|
+
- test/package/yamlSerializer.test.js
|
|
434
439
|
- test/peer-dependencies.sh
|
|
435
440
|
- test/resolver.js
|
|
436
441
|
- test/scripts/remove-use-strict.test.js
|
|
437
442
|
- test/typescript/build.test.js
|
|
438
443
|
- test/typescript/environments.test.js
|
|
439
444
|
- test/typescript/pathValidation.test.js
|
|
445
|
+
- test/typescript/requireOrError.test.js
|
|
440
446
|
- 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
|
-
}
|