@skitterbyte/skitterspec-linear 18.2.0 → 18.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.
- package/bin/skitterspec-linear.js +7 -0
- package/package.json +1 -1
- package/src/env/config.js +47 -2
|
@@ -33,6 +33,13 @@ if (!existsSync(join(__dirname, '..', 'src'))) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const { run, HELP } = require('../src/cli.js')
|
|
36
|
+
|
|
37
|
+
// The provider's isolation defaults, registered beneath the project's own
|
|
38
|
+
// env.config.json so `spec-env stage` claims this provider's snapshot sidecar
|
|
39
|
+
// without a hand edit (see common src/env/config.js, setProviderEnvDefaults).
|
|
40
|
+
require('../src/env/config.js').setProviderEnvDefaults(
|
|
41
|
+
require('../src/vendor/linear/config.js').ENV_CONFIG_DEFAULTS,
|
|
42
|
+
)
|
|
36
43
|
const {
|
|
37
44
|
PROVIDER_COMMANDS,
|
|
38
45
|
providerHelpSection,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skitterbyte/skitterspec-linear",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.3.0",
|
|
4
4
|
"description": "Spec-driven development for Claude Code, with one-way Linear sync — a superset of @skitterbyte/skitterspec: the base filesystem workflow plus /spec-status · /spec-push and the spec-sync CLI. The repo is canonical; Linear is a generated mirror. Install this OR the base, not both.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
package/src/env/config.js
CHANGED
|
@@ -759,6 +759,48 @@ function mergeConfig(base, parsed) {
|
|
|
759
759
|
* It is advisory in the strongest sense: nothing here acts on it, and a config
|
|
760
760
|
* full of strays loads exactly as it always did.
|
|
761
761
|
*/
|
|
762
|
+
// The isolation keys a ticketing provider needs a project to declare — set
|
|
763
|
+
// once per process by a provider superset's bin, beneath whatever the
|
|
764
|
+
// project's own env.config.json says. They used to reach only the
|
|
765
|
+
// `env.config.json.example` composed at build time, which left every project
|
|
766
|
+
// that adopted a provider over an EXISTING isolation config (or skipped the
|
|
767
|
+
// example) with a `spec.companionPaths` that never claims the provider's
|
|
768
|
+
// snapshot sidecar — `spec-env stage` then classifies the spec's own
|
|
769
|
+
// `<baseDir>/<identifier>.base.json` as foreign and `/commit` leaves it
|
|
770
|
+
// behind. The base distribution registers nothing and behaves as before.
|
|
771
|
+
let providerEnvDefaults = null
|
|
772
|
+
function setProviderEnvDefaults(overrides) {
|
|
773
|
+
providerEnvDefaults = overrides || null
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// Fill ONLY the keys the project's file does not mention: a key the file sets —
|
|
777
|
+
// including explicitly to '' or [] — is the project's decision and stands
|
|
778
|
+
// ("the two keys are one fix" in scripts/build-dist.test.js is the contract:
|
|
779
|
+
// blanking identifierField must keep disabling the companion expansion).
|
|
780
|
+
function applyProviderEnvDefaults(config, parsed) {
|
|
781
|
+
if (!providerEnvDefaults) return config
|
|
782
|
+
const d = providerEnvDefaults
|
|
783
|
+
const pBranch = parsed && typeof parsed.branch === 'object' && parsed.branch !== null ? parsed.branch : null
|
|
784
|
+
if (
|
|
785
|
+
d.branch &&
|
|
786
|
+
typeof d.branch.identifierField === 'string' &&
|
|
787
|
+
!(pBranch && 'identifierField' in pBranch) &&
|
|
788
|
+
!config.branch.identifierField
|
|
789
|
+
) {
|
|
790
|
+
config.branch.identifierField = d.branch.identifierField
|
|
791
|
+
}
|
|
792
|
+
const pSpec = parsed && typeof parsed.spec === 'object' && parsed.spec !== null ? parsed.spec : null
|
|
793
|
+
if (
|
|
794
|
+
d.spec &&
|
|
795
|
+
Array.isArray(d.spec.companionPaths) &&
|
|
796
|
+
!(pSpec && 'companionPaths' in pSpec) &&
|
|
797
|
+
!config.spec.companionPaths.length
|
|
798
|
+
) {
|
|
799
|
+
config.spec.companionPaths = [...d.spec.companionPaths]
|
|
800
|
+
}
|
|
801
|
+
return config
|
|
802
|
+
}
|
|
803
|
+
|
|
762
804
|
function loadEnvConfig(dir = process.cwd()) {
|
|
763
805
|
const base = defaults()
|
|
764
806
|
const file = join(dir, CONFIG_FILE)
|
|
@@ -767,7 +809,9 @@ function loadEnvConfig(dir = process.cwd()) {
|
|
|
767
809
|
try {
|
|
768
810
|
raw = readFileSync(file, 'utf-8')
|
|
769
811
|
} catch (error) {
|
|
770
|
-
if (error.code === 'ENOENT')
|
|
812
|
+
if (error.code === 'ENOENT') {
|
|
813
|
+
return { config: applyProviderEnvDefaults(base, null), present: false, unknown: [], badReviewers: [] }
|
|
814
|
+
}
|
|
771
815
|
throw error
|
|
772
816
|
}
|
|
773
817
|
|
|
@@ -779,7 +823,7 @@ function loadEnvConfig(dir = process.cwd()) {
|
|
|
779
823
|
}
|
|
780
824
|
|
|
781
825
|
return {
|
|
782
|
-
config: mergeConfig(base, parsed),
|
|
826
|
+
config: applyProviderEnvDefaults(mergeConfig(base, parsed), parsed),
|
|
783
827
|
present: true,
|
|
784
828
|
unknown: collectUnknownKeys(parsed),
|
|
785
829
|
badReviewers: collectBadReviewers(parsed),
|
|
@@ -788,6 +832,7 @@ function loadEnvConfig(dir = process.cwd()) {
|
|
|
788
832
|
|
|
789
833
|
module.exports = {
|
|
790
834
|
loadEnvConfig,
|
|
835
|
+
setProviderEnvDefaults,
|
|
791
836
|
resolveServePort,
|
|
792
837
|
derivedServePort,
|
|
793
838
|
servePortRoot,
|