@fern-api/fern-api-dev 5.23.3-1636-g551e2a4f2d4 → 5.23.3-1643-gb32b050440d
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/cli.cjs +87 -6
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -566096,6 +566096,7 @@ var require_AutoVersioningService = __commonJS({
|
|
|
566096
566096
|
}
|
|
566097
566097
|
}
|
|
566098
566098
|
let processedContent = this.removeGoModulePathSuffixPairs(contentLines);
|
|
566099
|
+
processedContent = this.removeGoExplicitFieldBitConstantPairs(processedContent);
|
|
566099
566100
|
processedContent = this.removeVersionChangePairs(processedContent, mappedMagicVersion);
|
|
566100
566101
|
processedContent = this.removeRemainingMagicVersionLines(processedContent, mappedMagicVersion);
|
|
566101
566102
|
let hasChanges2 = false;
|
|
@@ -566298,6 +566299,86 @@ var require_AutoVersioningService = __commonJS({
|
|
|
566298
566299
|
hasSuffix: suffixPattern.test(content5)
|
|
566299
566300
|
};
|
|
566300
566301
|
}
|
|
566302
|
+
/**
|
|
566303
|
+
* Removes Go `explicitFields` bit-constant reindexing churn from a diff section.
|
|
566304
|
+
*
|
|
566305
|
+
* The Go SDK tracks which optional fields were explicitly set via a per-struct `big.Int`
|
|
566306
|
+
* bitmask. For each struct property it generates a private constant whose value is a single
|
|
566307
|
+
* bit at the property's positional index, e.g.
|
|
566308
|
+
*
|
|
566309
|
+
* var (
|
|
566310
|
+
* entityFieldGeoShape = big.NewInt(1 << 3)
|
|
566311
|
+
* entityFieldGeoDetails = big.NewInt(1 << 4)
|
|
566312
|
+
* )
|
|
566313
|
+
*
|
|
566314
|
+
* Inserting a new field earlier in the struct shifts every following constant's bit index by
|
|
566315
|
+
* one, producing a deletion/addition pair per field that differs only by the integer:
|
|
566316
|
+
*
|
|
566317
|
+
* - entityFieldGeoShape = big.NewInt(1 << 3)
|
|
566318
|
+
* + entityFieldGeoShape = big.NewInt(1 << 4)
|
|
566319
|
+
*
|
|
566320
|
+
* This is a purely mechanical artifact of the field addition: the bit is assigned and read
|
|
566321
|
+
* within the same generated version (the wire format is name-based JSON, not bit position),
|
|
566322
|
+
* so shifting it is not observable to consumers. Left in the diff, the AI analyzer reads the
|
|
566323
|
+
* shifted bit positions as a serialization-compatibility break and misclassifies an additive
|
|
566324
|
+
* change as a spurious MAJOR bump. The genuinely new field, its own new bit constant, and its
|
|
566325
|
+
* setter are all pure additions with no matching deletion, so they survive this pass and the
|
|
566326
|
+
* AI still sees (and correctly classifies) the field addition as MINOR.
|
|
566327
|
+
*/
|
|
566328
|
+
removeGoExplicitFieldBitConstantPairs(lines) {
|
|
566329
|
+
const additions = [];
|
|
566330
|
+
for (let index3 = 0; index3 < lines.length; index3++) {
|
|
566331
|
+
const line = lines[index3];
|
|
566332
|
+
if (line == null || !this.isAdditionLine(line)) {
|
|
566333
|
+
continue;
|
|
566334
|
+
}
|
|
566335
|
+
const info = this.analyzeGoBitConstantLine(line);
|
|
566336
|
+
if (info != null) {
|
|
566337
|
+
additions.push({ index: index3, normalized: info.normalized });
|
|
566338
|
+
}
|
|
566339
|
+
}
|
|
566340
|
+
const removed = /* @__PURE__ */ new Set();
|
|
566341
|
+
const usedAdditions = /* @__PURE__ */ new Set();
|
|
566342
|
+
for (let index3 = 0; index3 < lines.length; index3++) {
|
|
566343
|
+
const line = lines[index3];
|
|
566344
|
+
if (line == null || !this.isDeletionLine(line)) {
|
|
566345
|
+
continue;
|
|
566346
|
+
}
|
|
566347
|
+
const info = this.analyzeGoBitConstantLine(line);
|
|
566348
|
+
if (info == null) {
|
|
566349
|
+
continue;
|
|
566350
|
+
}
|
|
566351
|
+
const match3 = additions.find((addition) => !usedAdditions.has(addition.index) && addition.normalized === info.normalized);
|
|
566352
|
+
if (match3 != null) {
|
|
566353
|
+
usedAdditions.add(match3.index);
|
|
566354
|
+
removed.add(index3);
|
|
566355
|
+
removed.add(match3.index);
|
|
566356
|
+
}
|
|
566357
|
+
}
|
|
566358
|
+
if (removed.size === 0) {
|
|
566359
|
+
return lines;
|
|
566360
|
+
}
|
|
566361
|
+
return lines.filter((_5, index3) => !removed.has(index3));
|
|
566362
|
+
}
|
|
566363
|
+
/**
|
|
566364
|
+
* If a diff line (with its leading +/- stripped) is a generated Go `explicitFields`
|
|
566365
|
+
* bit constant — `<name> = big.NewInt(1 << N)` or the >=63 form
|
|
566366
|
+
* `<name> = big.NewInt(0).Lsh(big.NewInt(1), N)` — returns a normalized key with the bit
|
|
566367
|
+
* index removed so a deletion and its reindexed addition compare equal. Requiring the exact
|
|
566368
|
+
* `big.NewInt` bit-shift shape keeps this from matching ordinary integer assignments.
|
|
566369
|
+
*/
|
|
566370
|
+
analyzeGoBitConstantLine(line) {
|
|
566371
|
+
const content5 = line.substring(1);
|
|
566372
|
+
const shiftMatch = content5.match(/^(\s*)([A-Za-z_][A-Za-z0-9_]*)\s*=\s*big\.NewInt\(1\s*<<\s*\d+\)\s*$/);
|
|
566373
|
+
if (shiftMatch?.[2] != null) {
|
|
566374
|
+
return { normalized: `${shiftMatch[2]}=big.NewInt(1<<#)` };
|
|
566375
|
+
}
|
|
566376
|
+
const lshMatch = content5.match(/^(\s*)([A-Za-z_][A-Za-z0-9_]*)\s*=\s*big\.NewInt\(0\)\.Lsh\(big\.NewInt\(1\),\s*\d+\)\s*$/);
|
|
566377
|
+
if (lshMatch?.[2] != null) {
|
|
566378
|
+
return { normalized: `${lshMatch[2]}=big.NewInt(0).Lsh(big.NewInt(1),#)` };
|
|
566379
|
+
}
|
|
566380
|
+
return void 0;
|
|
566381
|
+
}
|
|
566301
566382
|
/**
|
|
566302
566383
|
* Gets the latest semantic version from git tags in the given repository.
|
|
566303
566384
|
* Used as a fallback when the magic version is not embedded in any generated file
|
|
@@ -691502,7 +691583,7 @@ var AccessTokenPosthogManager = class {
|
|
|
691502
691583
|
properties: {
|
|
691503
691584
|
...event,
|
|
691504
691585
|
...event.properties,
|
|
691505
|
-
version: "5.23.3-
|
|
691586
|
+
version: "5.23.3-1643-gb32b050440d",
|
|
691506
691587
|
usingAccessToken: true,
|
|
691507
691588
|
...getRunIdProperties()
|
|
691508
691589
|
}
|
|
@@ -691568,7 +691649,7 @@ var UserPosthogManager = class {
|
|
|
691568
691649
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
691569
691650
|
event: "CLI",
|
|
691570
691651
|
properties: {
|
|
691571
|
-
version: "5.23.3-
|
|
691652
|
+
version: "5.23.3-1643-gb32b050440d",
|
|
691572
691653
|
...event,
|
|
691573
691654
|
...event.properties,
|
|
691574
691655
|
usingAccessToken: false,
|
|
@@ -872674,7 +872755,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
872674
872755
|
var LOGS_FOLDER_NAME = "logs";
|
|
872675
872756
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
872676
872757
|
function getCliSource() {
|
|
872677
|
-
const version7 = "5.23.3-
|
|
872758
|
+
const version7 = "5.23.3-1643-gb32b050440d";
|
|
872678
872759
|
return `cli@${version7}`;
|
|
872679
872760
|
}
|
|
872680
872761
|
var DebugLogger = class {
|
|
@@ -905352,7 +905433,7 @@ var LegacyDocsPublisher = class {
|
|
|
905352
905433
|
previewId,
|
|
905353
905434
|
disableTemplates: void 0,
|
|
905354
905435
|
skipUpload,
|
|
905355
|
-
cliVersion: "5.23.3-
|
|
905436
|
+
cliVersion: "5.23.3-1643-gb32b050440d",
|
|
905356
905437
|
loginCommand: "fern auth login"
|
|
905357
905438
|
});
|
|
905358
905439
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -972270,7 +972351,7 @@ function getAutomationContextFromEnv() {
|
|
|
972270
972351
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
972271
972352
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
972272
972353
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
972273
|
-
cli_version: "5.23.3-
|
|
972354
|
+
cli_version: "5.23.3-1643-gb32b050440d"
|
|
972274
972355
|
};
|
|
972275
972356
|
}
|
|
972276
972357
|
function isAutomationMode() {
|
|
@@ -973102,7 +973183,7 @@ var CliContext = class _CliContext {
|
|
|
973102
973183
|
if (false) {
|
|
973103
973184
|
this.logger.error("CLI_VERSION is not defined");
|
|
973104
973185
|
}
|
|
973105
|
-
return "5.23.3-
|
|
973186
|
+
return "5.23.3-1643-gb32b050440d";
|
|
973106
973187
|
}
|
|
973107
973188
|
getCliName() {
|
|
973108
973189
|
if (false) {
|
package/package.json
CHANGED