code-foundry 1.39.2 → 1.39.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/.githooks/pre-commit +9 -2
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/commands/sync.mjs +0 -17
package/.githooks/pre-commit
CHANGED
|
@@ -6,8 +6,15 @@ if [ -z "$(git diff --cached --name-only)" ]; then
|
|
|
6
6
|
exit 0
|
|
7
7
|
fi
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
# Prefer a runtime the repository already depends on. A repository opts into
|
|
10
|
+
# the gate by depending on code-foundry; one that does not keeps the
|
|
11
|
+
# whitespace guard and stays offline. Nothing is fetched at commit time.
|
|
12
|
+
if [ -x node_modules/.bin/code-foundry ]; then
|
|
13
|
+
exec node_modules/.bin/code-foundry pre-commit
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ -f src/runtime.mjs ]; then
|
|
17
|
+
exec node src/runtime.mjs pre-commit
|
|
11
18
|
fi
|
|
12
19
|
|
|
13
20
|
git diff --cached --check
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.39.3](https://github.com/0xPlayerOne/code-foundry/compare/v1.39.2...v1.39.3) (2026-10-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **hooks:** run the gate from a local dependency, not npx ([#688](https://github.com/0xPlayerOne/code-foundry/issues/688)) ([d256b69](https://github.com/0xPlayerOne/code-foundry/commit/d256b69b8f89f0041a01c53cc51af32fe582b5dc))
|
|
9
|
+
|
|
3
10
|
## [1.39.2](https://github.com/0xPlayerOne/code-foundry/compare/v1.39.1...v1.39.2) (2026-10-01)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-foundry",
|
|
3
|
-
"version": "1.39.
|
|
3
|
+
"version": "1.39.3",
|
|
4
4
|
"description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
|
|
5
5
|
"homepage": "https://github.com/0xPlayerOne/code-foundry#readme",
|
|
6
6
|
"bugs": {
|
package/src/commands/sync.mjs
CHANGED
|
@@ -260,9 +260,6 @@ function synchronize(options) {
|
|
|
260
260
|
if (file === 'LICENSE' && license !== 'preserve' && license !== 'none') continue
|
|
261
261
|
if (file === '.github/CODEOWNERS' && existsSync(destination)) continue
|
|
262
262
|
let content = readFileSync(sourceFile)
|
|
263
|
-
if (file === '.githooks/pre-commit') {
|
|
264
|
-
content = Buffer.from(renderHook(sourceFile, source))
|
|
265
|
-
}
|
|
266
263
|
if (file === 'release-please-config.json') {
|
|
267
264
|
content = Buffer.from(renderReleaseConfig(target, sourceFile))
|
|
268
265
|
}
|
|
@@ -589,20 +586,6 @@ function renderReleaseConfig(target, sourceFile) {
|
|
|
589
586
|
return `${JSON.stringify(mergeReleaseConfig(target, sourceFile), null, 2)}\n`
|
|
590
587
|
}
|
|
591
588
|
|
|
592
|
-
/**
|
|
593
|
-
* The hook runs `npx code-foundry@<version>` on every commit, so the version
|
|
594
|
-
* is substituted at generation time rather than resolved at run time. A
|
|
595
|
-
* mutable dist-tag there would let any publish under that tag run code on
|
|
596
|
-
* every developer's machine at commit time; pinning means the gate a
|
|
597
|
-
* repository received is the gate that generated it.
|
|
598
|
-
*
|
|
599
|
-
* @param {string} sourceFile the template path
|
|
600
|
-
* @param {string} sourceRoot the package root that carries package.json
|
|
601
|
-
*/
|
|
602
|
-
function renderHook(sourceFile, sourceRoot) {
|
|
603
|
-
return readFileSync(sourceFile, 'utf8').replaceAll('__VERSION__', readPackageVersion(sourceRoot))
|
|
604
|
-
}
|
|
605
|
-
|
|
606
589
|
/** @param {string} file @param {string} languages @param {string} features @param {Record<string, string>} config */
|
|
607
590
|
function shouldInclude(file, languages, features, config) {
|
|
608
591
|
if (file === 'ruff.toml') return includesValue(languages, 'python')
|