@workos/oagen 0.19.6 → 0.20.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/dist/cli/index.mjs +15 -20
- package/dist/cli/index.mjs.map +1 -1
- package/dist/compat/index.mjs +1 -1
- package/dist/differ-CC65Efzt.d.mts.map +1 -1
- package/dist/{overlay-Dk70ilXl.mjs → overlay-cb32jDBS.mjs} +16 -21
- package/dist/overlay-cb32jDBS.mjs.map +1 -0
- package/dist/verify/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/overlay-Dk70ilXl.mjs.map +0 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -7867,9 +7867,11 @@ function collectTypeFieldSets(snapshot) {
|
|
|
7867
7867
|
* (e.g. `ApiKey` → `OrganizationApiKey` + `UserApiKey`). The wire shape
|
|
7868
7868
|
* returned by individual endpoints is unchanged — `OrganizationApiKey`
|
|
7869
7869
|
* has the same fields `ApiKey` had — so consumer code accessing those
|
|
7870
|
-
* fields keeps working. The
|
|
7871
|
-
*
|
|
7872
|
-
*
|
|
7870
|
+
* fields *through a return value* keeps working. The parent symbol
|
|
7871
|
+
* itself, however, is gone: callers who referenced it by name (Sorbet
|
|
7872
|
+
* annotations, `is_a?` checks, pattern matches, deserialization targets)
|
|
7873
|
+
* will fail at runtime. The parent removal therefore stays `breaking`;
|
|
7874
|
+
* we only attach a remediation hint pointing at the new name.
|
|
7873
7875
|
*
|
|
7874
7876
|
* Identity criteria (must all hold):
|
|
7875
7877
|
* 1. The removed symbol owns ≥ 1 field/property in the baseline (i.e.
|
|
@@ -7884,10 +7886,11 @@ function collectTypeFieldSets(snapshot) {
|
|
|
7884
7886
|
*
|
|
7885
7887
|
* Returns a `removedName -> newName` map so a downstream cascade pass
|
|
7886
7888
|
* can downgrade owned-field removals and `*_type_changed` pointing at
|
|
7887
|
-
* the same pair
|
|
7889
|
+
* the same pair — those *are* downgraded to `soft-risk`, since values
|
|
7890
|
+
* flowing through the new type continue to expose the same fields.
|
|
7888
7891
|
*
|
|
7889
|
-
* Mutates matching `symbol_removed` entries in `changes`:
|
|
7890
|
-
* `
|
|
7892
|
+
* Mutates matching `symbol_removed` entries in `changes`: attaches a
|
|
7893
|
+
* `remediation` describing the rename. Severity is left at `breaking`.
|
|
7891
7894
|
*/
|
|
7892
7895
|
function detectTypeRenames(changes, baseline, candidate) {
|
|
7893
7896
|
const renameMap = /* @__PURE__ */ new Map();
|
|
@@ -7910,10 +7913,7 @@ function detectTypeRenames(changes, baseline, candidate) {
|
|
|
7910
7913
|
const [newName] = match;
|
|
7911
7914
|
renameMap.set(baselineTypeName, newName);
|
|
7912
7915
|
const parentRemoval = parentRemovalByName.get(baselineTypeName);
|
|
7913
|
-
if (parentRemoval) {
|
|
7914
|
-
parentRemoval.severity = "soft-risk";
|
|
7915
|
-
parentRemoval.remediation = `Type "${baselineTypeName}" appears to have been renamed to "${newName}" — the new type has every field of the old (a non-strict superset). Field accesses and method calls on values of type "${newName}" continue to work; only explicit "${baselineTypeName}" type annotations need to migrate. Consider emitting a deprecated alias \`type ${baselineTypeName} = ${newName}\` in languages that support it.`;
|
|
7916
|
-
}
|
|
7916
|
+
if (parentRemoval) parentRemoval.remediation = `Type "${baselineTypeName}" appears to have been renamed to "${newName}" — the new type has every field of the old (a non-strict superset). Field accesses and method calls on values of type "${newName}" continue to work; only explicit "${baselineTypeName}" type annotations need to migrate. Consider emitting a deprecated alias \`type ${baselineTypeName} = ${newName}\` in languages that support it.`;
|
|
7917
7917
|
}
|
|
7918
7918
|
return renameMap;
|
|
7919
7919
|
}
|
|
@@ -7924,8 +7924,9 @@ function detectTypeRenames(changes, baseline, candidate) {
|
|
|
7924
7924
|
* baseline parent's field references an alias-type `OldOwner` and the new
|
|
7925
7925
|
* parent's same-named field references a different alias `NewOwner`, the
|
|
7926
7926
|
* pair is the same type-concept under a renamed name. Record the
|
|
7927
|
-
* secondary rename so the cascade can downgrade `
|
|
7928
|
-
*
|
|
7927
|
+
* secondary rename so the cascade can downgrade any `field_type_changed`
|
|
7928
|
+
* pointing at the pair, and attach a remediation hint to `OldOwner`'s
|
|
7929
|
+
* `symbol_removed` (which stays `breaking` — see `detectTypeRenames`).
|
|
7929
7930
|
*
|
|
7930
7931
|
* Why this is necessary: discriminated-union owner types (Go's
|
|
7931
7932
|
* `APIKeyWithValueOwner`, PHP/Python's nested constructor params) are
|
|
@@ -7968,10 +7969,7 @@ function inferTransitiveTypeRenames(typeRenames, baseline, candidate, changes) {
|
|
|
7968
7969
|
if (typeRenames.has(oldT)) continue;
|
|
7969
7970
|
typeRenames.set(oldT, newT);
|
|
7970
7971
|
const removal = parentRemovalByName.get(oldT);
|
|
7971
|
-
if (removal) {
|
|
7972
|
-
removal.severity = "soft-risk";
|
|
7973
|
-
removal.remediation = `Type "${oldT}" appears to have been renamed to "${newT}" — inferred transitively because the renamed parent "${oldOwner}" → "${newOwner}" has a "${localName}" field whose type swapped from "${oldT}" to "${newT}". Consider emitting a deprecated alias \`type ${oldT} = ${newT}\` in languages that support it.`;
|
|
7974
|
-
}
|
|
7972
|
+
if (removal) removal.remediation = `Type "${oldT}" appears to have been renamed to "${newT}" — inferred transitively because the renamed parent "${oldOwner}" → "${newOwner}" has a "${localName}" field whose type swapped from "${oldT}" to "${newT}". Consider emitting a deprecated alias \`type ${oldT} = ${newT}\` in languages that support it.`;
|
|
7975
7973
|
}
|
|
7976
7974
|
}
|
|
7977
7975
|
/**
|
|
@@ -8008,10 +8006,7 @@ function detectEnumRenames(changes, baseline, candidate) {
|
|
|
8008
8006
|
const [newName] = match;
|
|
8009
8007
|
renameMap.set(baselineEnumName, newName);
|
|
8010
8008
|
const parentRemoval = parentRemovalByName.get(baselineEnumName);
|
|
8011
|
-
if (parentRemoval) {
|
|
8012
|
-
parentRemoval.severity = "soft-risk";
|
|
8013
|
-
parentRemoval.remediation = `Enum "${baselineEnumName}" appears to have been renamed to "${newName}" — both enums have identical wire values, so on-the-wire serialization is unchanged. This is typically the emitter's dedup canonical-flip after a new same-shape enum joined the spec. Consider emitting a deprecated alias in languages that support it, or pinning the canonical via emitter config.`;
|
|
8014
|
-
}
|
|
8009
|
+
if (parentRemoval) parentRemoval.remediation = `Enum "${baselineEnumName}" appears to have been renamed to "${newName}" — both enums have identical wire values, so on-the-wire serialization is unchanged. This is typically the emitter's dedup canonical-flip after a new same-shape enum joined the spec. Consider emitting a deprecated alias in languages that support it, or pinning the canonical via emitter config.`;
|
|
8015
8010
|
}
|
|
8016
8011
|
return renameMap;
|
|
8017
8012
|
}
|