code-foundry 0.40.1 → 0.40.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.
- package/.github/dependabot.yml +8 -0
- package/.prettierignore +5 -1
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/commands/sync.mjs +4 -2
- package/src/runtime.mjs +23 -1
package/.github/dependabot.yml
CHANGED
|
@@ -28,6 +28,14 @@ updates:
|
|
|
28
28
|
npm-dependencies:
|
|
29
29
|
applies-to: version-updates
|
|
30
30
|
patterns: ['*']
|
|
31
|
+
ignore:
|
|
32
|
+
# TypeScript 7 cannot resolve node: builtins in this toolchain
|
|
33
|
+
# (verified); revisit when the TS/eslint toolchain supports TS 7.
|
|
34
|
+
- dependency-name: 'typescript'
|
|
35
|
+
versions: ['>=7.0.0']
|
|
36
|
+
# Held with TypeScript 5.9 above.
|
|
37
|
+
- dependency-name: '@types/node'
|
|
38
|
+
versions: ['>=23']
|
|
31
39
|
- package-ecosystem: cargo
|
|
32
40
|
directory: /
|
|
33
41
|
target-branch: staging
|
package/.prettierignore
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Generated release metadata is intentionally managed by Release Please.
|
|
2
2
|
CHANGELOG.md
|
|
3
3
|
|
|
4
|
-
# Runtime files are checked out under .github during CI.
|
|
4
|
+
# Runtime files are checked out under .github during CI. Composite actions
|
|
5
|
+
# are copied to .github/actions for the workflow run and must not be policed
|
|
6
|
+
# by consumer formatters (their style follows the runtime baseline, not the
|
|
7
|
+
# consumer .prettierrc).
|
|
5
8
|
.github/.code-foundry
|
|
9
|
+
.github/actions/
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.40.3](https://github.com/0xPlayerOne/code-foundry/compare/v0.40.2...v0.40.3) (2026-09-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **sync:** hold TypeScript toolchain below v7 in consumer dependabot config ([e3c91e1](https://github.com/0xPlayerOne/code-foundry/commit/e3c91e1079bfcd69d174d3ede6d20674eb8fd37b))
|
|
9
|
+
|
|
10
|
+
## [0.40.2](https://github.com/0xPlayerOne/code-foundry/compare/v0.40.1...v0.40.2) (2026-09-05)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **validation:** skip eslint fallback without repo setup and ignore overlaid actions ([bb4756c](https://github.com/0xPlayerOne/code-foundry/commit/bb4756cb8a40199f4d0b6bdb47020f0bc7283de1))
|
|
16
|
+
|
|
3
17
|
## [0.40.1](https://github.com/0xPlayerOne/code-foundry/compare/v0.40.0...v0.40.1) (2026-08-31)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
package/src/commands/sync.mjs
CHANGED
|
@@ -243,8 +243,10 @@ export function syncRepository(options) {
|
|
|
243
243
|
}
|
|
244
244
|
if (includesValue(languages, 'typescript') && existsSync(join(target, '.prettierignore'))) {
|
|
245
245
|
const prettierIgnore = readFileSync(join(target, '.prettierignore'), 'utf8')
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
const present = new Set(prettierIgnore.split(/\r?\n/).map((line) => line.trim()))
|
|
247
|
+
const missing = ['.github/.code-foundry', '.github/actions/'].filter((entry) => !present.has(entry))
|
|
248
|
+
if (missing.length) {
|
|
249
|
+
writeOrReport(join(target, '.prettierignore'), `${prettierIgnore.trimEnd()}\n${missing.join('\n')}\n`, dryRun)
|
|
248
250
|
changed.push('.prettierignore')
|
|
249
251
|
}
|
|
250
252
|
}
|
package/src/runtime.mjs
CHANGED
|
@@ -254,6 +254,28 @@ function hasDependencyManifest(ecosystem) {
|
|
|
254
254
|
return false
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Detect repository-owned ESLint setup: a lint script, an eslint dependency
|
|
259
|
+
* (or script reference), or a tracked flat/legacy config file. Repositories
|
|
260
|
+
* without any of these have nothing for the fallback runner to enforce, so
|
|
261
|
+
* lint skips instead of forcing a network fetch of ESLint in CI.
|
|
262
|
+
* @returns {boolean}
|
|
263
|
+
*/
|
|
264
|
+
function hasEslintSetup() {
|
|
265
|
+
const pkg = readPackage() ?? {}
|
|
266
|
+
const scripts = pkg.scripts ?? {}
|
|
267
|
+
if (scripts.lint) return true
|
|
268
|
+
const dependencies = {
|
|
269
|
+
...(pkg.dependencies ?? {}),
|
|
270
|
+
...(pkg.devDependencies ?? {}),
|
|
271
|
+
...(pkg.optionalDependencies ?? {}),
|
|
272
|
+
...(pkg.peerDependencies ?? {}),
|
|
273
|
+
}
|
|
274
|
+
if (dependencies.eslint) return true
|
|
275
|
+
if (Object.values(scripts).some((value) => /\beslint\b/.test(String(value)))) return true
|
|
276
|
+
return repositoryTestFiles().some((file) => /(^|\/)(\.eslintrc[^/]*|eslint\.config\.[^/]*)$/.test(file))
|
|
277
|
+
}
|
|
278
|
+
|
|
257
279
|
/** @param {string} task */
|
|
258
280
|
function ci(task) {
|
|
259
281
|
if (task === 'install') return install()
|
|
@@ -274,7 +296,7 @@ function ci(task) {
|
|
|
274
296
|
}
|
|
275
297
|
if (task === 'lint') {
|
|
276
298
|
const scripted = runScript(['lint'])
|
|
277
|
-
if (!scripted && (hasLanguage('typescript') || hasLanguage('javascript')) && hasRootJavascriptProject()) runTool('eslint', ['.'])
|
|
299
|
+
if (!scripted && (hasLanguage('typescript') || hasLanguage('javascript')) && hasRootJavascriptProject() && hasEslintSetup()) runTool('eslint', ['.'])
|
|
278
300
|
if (hasLanguage('python') && hasRootPythonProject()) runTool('ruff', ['check', '.'])
|
|
279
301
|
if (hasLanguage('rust') && hasRootRustProject()) run('cargo', ['clippy', '--all-targets', '--', '-D', 'warnings'])
|
|
280
302
|
return
|