skyltmax_config 1.0.0 → 2.0.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/.devcontainer/boot.sh +55 -16
- data/.devcontainer/devcontainer.json +7 -1
- data/.devcontainer/docker-compose.yml +1 -1
- data/.gitignore +2 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +18 -18
- data/README.md +12 -21
- data/eslint.js +17 -1
- data/fixture/package.json +4 -22
- data/fixture/pnpm-lock.yaml +844 -1040
- data/fixture/pnpm-workspace.yaml +6 -0
- data/lib/skyltmax_config/version.rb +1 -1
- data/package.json +23 -25
- data/pnpm-lock.yaml +1108 -1456
- data/pnpm-workspace.yaml +10 -0
- data/prettier.js +3 -1
- data/skyltmax_config.gemspec +3 -1
- data/tests/configs.test.js +47 -0
- metadata +5 -9
- data/AGENTS.md +0 -677
- data/scripts/peer-deps/audit.js +0 -132
- data/scripts/peer-deps/install.js +0 -206
- data/tests/check-peers.test.js +0 -76
- data/tests/fixtures/manifest-no-peers.json +0 -3
- data/tests/fixtures/manifest-with-peers.json +0 -6
- data/tests/install-peers.test.js +0 -115
data/pnpm-workspace.yaml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
allowBuilds:
|
|
2
|
+
esbuild: true
|
|
3
|
+
unrs-resolver: true
|
|
4
|
+
|
|
5
|
+
# Supply-chain settle, enforced where RESOLUTION happens (3 days, matching Renovate's npm settle). Renovate's own
|
|
6
|
+
# minimumReleaseAge does not govern lockfile maintenance — its worker runs pnpm, and pnpm reads this file.
|
|
7
|
+
minimumReleaseAge: 4320
|
|
8
|
+
# Skip re-verifying committed lockfile entries on install: entries resolved before this policy existed can be younger
|
|
9
|
+
# than the cutoff, and every commit lands via a reviewed PR, so the lockfile is the trusted base.
|
|
10
|
+
trustLockfile: true
|
data/prettier.js
CHANGED
|
@@ -46,7 +46,9 @@ export const config = {
|
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
],
|
|
49
|
-
|
|
49
|
+
// Resolved from this package's own dependencies. Bare names would be resolved by prettier's import() from the
|
|
50
|
+
// consumer's context, which is exactly the phantom-dependency setup v2 removes.
|
|
51
|
+
plugins: [import.meta.resolve("prettier-plugin-ignored"), import.meta.resolve("prettier-plugin-tailwindcss")],
|
|
50
52
|
tailwindAttributes: ["class", "className", ".*[cC]lassName"],
|
|
51
53
|
tailwindFunctions: ["clsx", "cn", "twcn"],
|
|
52
54
|
}
|
data/skyltmax_config.gemspec
CHANGED
|
@@ -25,7 +25,9 @@ Gem::Specification.new do |s|
|
|
|
25
25
|
|
|
26
26
|
# include all tracked files so packaged gem mirrors the repo's config assets
|
|
27
27
|
s.files = Dir.chdir(__dir__) do
|
|
28
|
-
`git ls-files -z`.split("\x0").reject
|
|
28
|
+
`git ls-files -z`.split("\x0").reject do |path|
|
|
29
|
+
path.start_with?(".github/", "docs/") || path == "renovate.json5"
|
|
30
|
+
end
|
|
29
31
|
end
|
|
30
32
|
s.require_path = "lib"
|
|
31
33
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest"
|
|
2
|
+
|
|
3
|
+
import { config as eslintConfig } from "../eslint.js"
|
|
4
|
+
import { config as prettierConfig } from "../prettier.js"
|
|
5
|
+
|
|
6
|
+
describe("prettier config", () => {
|
|
7
|
+
test("plugins are resolved to URLs inside this package, not bare names", async () => {
|
|
8
|
+
expect(prettierConfig.plugins).toHaveLength(2)
|
|
9
|
+
|
|
10
|
+
for (const plugin of prettierConfig.plugins) {
|
|
11
|
+
expect(plugin).toMatch(/^file:\/\//)
|
|
12
|
+
// a bare name would make prettier resolve from the consumer's context; a URL is import()-able from anywhere
|
|
13
|
+
await expect(import(plugin)).resolves.toBeDefined()
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
// Every plugin eslint.js loads, alphabetically. All of them resolve from this package's own dependencies, so a missing
|
|
19
|
+
// entry means a dependency or an import in eslint.js broke — never a consumer misconfiguration.
|
|
20
|
+
const EXPECTED_ESLINT_PLUGINS = [
|
|
21
|
+
"@typescript-eslint",
|
|
22
|
+
"import",
|
|
23
|
+
"jest-dom",
|
|
24
|
+
"jsx-a11y",
|
|
25
|
+
"prettier",
|
|
26
|
+
"react",
|
|
27
|
+
"react-hooks",
|
|
28
|
+
"testing-library",
|
|
29
|
+
"vitest",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
describe("eslint config", () => {
|
|
33
|
+
test("exports a flat config array with every plugin loaded from our own dependencies", () => {
|
|
34
|
+
expect(Array.isArray(eslintConfig)).toBe(true)
|
|
35
|
+
expect(eslintConfig.length).toBeGreaterThan(0)
|
|
36
|
+
|
|
37
|
+
const plugins = new Map(eslintConfig.flatMap(entry => Object.entries(entry.plugins ?? {})))
|
|
38
|
+
|
|
39
|
+
for (const expected of EXPECTED_ESLINT_PLUGINS) {
|
|
40
|
+
// The value, not just the key: a failed import leaves the name in place with nothing behind it.
|
|
41
|
+
expect(plugins.get(expected), `plugin "${expected}" should be loaded`).toBeInstanceOf(Object)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Exact roster, so adding or dropping a plugin has to be a deliberate edit to the list above.
|
|
45
|
+
expect([...plugins.keys()].sort()).toEqual(EXPECTED_ESLINT_PLUGINS)
|
|
46
|
+
})
|
|
47
|
+
})
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: skyltmax_config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Signmax AB
|
|
@@ -95,7 +95,6 @@ files:
|
|
|
95
95
|
- ".gitignore"
|
|
96
96
|
- ".prettierignore"
|
|
97
97
|
- ".rubocop.yml"
|
|
98
|
-
- AGENTS.md
|
|
99
98
|
- CHANGELOG.md
|
|
100
99
|
- Gemfile
|
|
101
100
|
- Gemfile.lock
|
|
@@ -108,6 +107,7 @@ files:
|
|
|
108
107
|
- fixture/eslint.config.js
|
|
109
108
|
- fixture/package.json
|
|
110
109
|
- fixture/pnpm-lock.yaml
|
|
110
|
+
- fixture/pnpm-workspace.yaml
|
|
111
111
|
- fixture/src/index.ts
|
|
112
112
|
- fixture/src/ui/button.tsx
|
|
113
113
|
- fixture/tsconfig.json
|
|
@@ -116,17 +116,13 @@ files:
|
|
|
116
116
|
- lib/skyltmax_config/version.rb
|
|
117
117
|
- package.json
|
|
118
118
|
- pnpm-lock.yaml
|
|
119
|
+
- pnpm-workspace.yaml
|
|
119
120
|
- prettier.js
|
|
120
121
|
- reset.d.ts
|
|
121
122
|
- rubocop.rails.yml
|
|
122
123
|
- rubocop.yml
|
|
123
|
-
- scripts/peer-deps/audit.js
|
|
124
|
-
- scripts/peer-deps/install.js
|
|
125
124
|
- skyltmax_config.gemspec
|
|
126
|
-
- tests/
|
|
127
|
-
- tests/fixtures/manifest-no-peers.json
|
|
128
|
-
- tests/fixtures/manifest-with-peers.json
|
|
129
|
-
- tests/install-peers.test.js
|
|
125
|
+
- tests/configs.test.js
|
|
130
126
|
- tsconfig.json
|
|
131
127
|
- typescript.json
|
|
132
128
|
homepage: https://github.com/skyltmax/config
|
|
@@ -150,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
150
146
|
- !ruby/object:Gem::Version
|
|
151
147
|
version: '4.0'
|
|
152
148
|
requirements: []
|
|
153
|
-
rubygems_version: 4.0.
|
|
149
|
+
rubygems_version: 4.0.16
|
|
154
150
|
specification_version: 4
|
|
155
151
|
summary: Reasonable Rubocop configs.
|
|
156
152
|
test_files: []
|