skyltmax_config 1.0.0 → 2.0.0.beta.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/.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 +12 -0
- data/Gemfile.lock +1 -1
- data/README.md +12 -21
- data/fixture/package.json +3 -22
- data/fixture/pnpm-lock.yaml +432 -495
- data/fixture/pnpm-workspace.yaml +2 -0
- data/lib/skyltmax_config/version.rb +1 -1
- data/package.json +14 -17
- data/pnpm-lock.yaml +406 -214
- data/pnpm-workspace.yaml +3 -0
- data/prettier.js +3 -1
- data/tests/configs.test.js +47 -0
- metadata +4 -8
- 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
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
|
}
|
|
@@ -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.beta.1
|
|
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
|