@digitraffic/common 2026.11.2-1 → 2026.11.13-1

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.
@@ -408,6 +408,23 @@ describe("convertJsonSchemaNullableToOneOfDeep", () => {
408
408
  },
409
409
  })).not.toThrow();
410
410
  });
411
+ test("keeps null type working when it is also marked nullable", () => {
412
+ // { type: "null", nullable: true } must not become
413
+ // oneOf: [{ type: "null" }, { type: "null" }], because null would then
414
+ // match both alternatives and oneOf would reject it
415
+ const schema = convertJsonSchemaNullableToOneOfDeep({
416
+ type: "object",
417
+ properties: {
418
+ empty: { type: "null", nullable: true },
419
+ },
420
+ });
421
+ expect(schema).toEqual({
422
+ type: "object",
423
+ properties: {
424
+ empty: { type: "null" },
425
+ },
426
+ });
427
+ });
411
428
  test("creates an API Gateway schema from Zod", () => {
412
429
  const schema = toApiGatewayJsonSchema(z.object({
413
430
  reason: z.string().nullable(),
@@ -2,7 +2,7 @@ import type { IVpc } from "aws-cdk-lib/aws-ec2";
2
2
  import { CfnDBProxyEndpoint, DatabaseProxy } from "aws-cdk-lib/aws-rds";
3
3
  import type { ISecret } from "aws-cdk-lib/aws-secretsmanager";
4
4
  import { Stack } from "aws-cdk-lib/core";
5
- import type { Construct } from "constructs/lib/construct.js";
5
+ import type { Construct } from "constructs";
6
6
  import type { InfraStackConfiguration } from "./intra-stack-configuration.js";
7
7
  export interface ProxyConfiguration {
8
8
  readonly secretArn: string;
@@ -3,7 +3,7 @@ import { Key } from "aws-cdk-lib/aws-kms";
3
3
  import type { AuroraPostgresEngineVersion, DatabaseClusterProps, IParameterGroup } from "aws-cdk-lib/aws-rds";
4
4
  import { DatabaseCluster } from "aws-cdk-lib/aws-rds";
5
5
  import { Stack } from "aws-cdk-lib/core";
6
- import type { Construct } from "constructs/lib/construct.js";
6
+ import type { Construct } from "constructs";
7
7
  import type { InfraStackConfiguration } from "./intra-stack-configuration.js";
8
8
  export interface DbConfiguration {
9
9
  readonly cluster?: ClusterConfiguration;
@@ -1,7 +1,7 @@
1
1
  import type { IVpc } from "aws-cdk-lib/aws-ec2";
2
2
  import { Vpc } from "aws-cdk-lib/aws-ec2";
3
3
  import { Stack } from "aws-cdk-lib/core";
4
- import type { Construct } from "constructs/lib/construct.js";
4
+ import type { Construct } from "constructs";
5
5
  import type { InfraStackConfiguration } from "./intra-stack-configuration.js";
6
6
  export interface NetworkConfiguration {
7
7
  readonly vpcName: string;
@@ -183,6 +183,12 @@ function convertNullableSchema(schema) {
183
183
  if (nullable !== true) {
184
184
  return rest;
185
185
  }
186
+ // A null type already allows only null, so adding a null alternative
187
+ // would make null match two oneOf alternatives and be rejected.
188
+ // biome-ignore lint/complexity/useLiteralKeys: index signature requires bracket notation
189
+ if (rest["type"] === "null") {
190
+ return rest;
191
+ }
186
192
  // A simple typed schema cannot overlap with null, so oneOf is safe.
187
193
  // biome-ignore lint/complexity/useLiteralKeys: index signature requires bracket notation
188
194
  if (typeof rest["type"] === "string") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitraffic/common",
3
- "version": "2026.11.2-1",
3
+ "version": "2026.11.13-1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "repository": {
@@ -112,63 +112,63 @@
112
112
  "dist/**/*.d.ts"
113
113
  ],
114
114
  "devDependencies": {
115
- "@aws-sdk/client-api-gateway": "3.1098.0",
116
- "@aws-sdk/client-s3": "3.1098.0",
117
- "@aws-sdk/client-secrets-manager": "3.1098.0",
118
- "@aws-sdk/client-sns": "3.1098.0",
119
- "@aws-sdk/lib-storage": "3.1098.0",
120
- "@biomejs/biome": "2.5.6",
115
+ "@aws-sdk/client-api-gateway": "3.1163.0",
116
+ "@aws-sdk/client-s3": "3.1163.0",
117
+ "@aws-sdk/client-secrets-manager": "3.1163.0",
118
+ "@aws-sdk/client-sns": "3.1163.0",
119
+ "@aws-sdk/lib-storage": "3.1163.0",
120
+ "@biomejs/biome": "2.6.5",
121
121
  "@date-fns/tz": "1.5.0",
122
- "@rushstack/heft": "1.2.22",
123
- "@rushstack/heft-typescript-plugin": "1.3.17",
124
- "@smithy/fetch-http-handler": "5.6.13",
125
- "@smithy/node-http-handler": "4.9.13",
126
- "@smithy/types": "4.16.1",
127
- "@types/aws-lambda": "8.10.162",
122
+ "@rushstack/heft": "1.3.5",
123
+ "@rushstack/heft-typescript-plugin": "1.3.27",
124
+ "@smithy/fetch-http-handler": "5.8.1",
125
+ "@smithy/node-http-handler": "4.14.2",
126
+ "@smithy/types": "4.20.0",
127
+ "@types/aws-lambda": "8.10.164",
128
128
  "@types/etag": "1.8.4",
129
129
  "@types/geojson": "7946.0.16",
130
130
  "@types/geojson-validation": "1.0.3",
131
131
  "@types/madge": "5.0.3",
132
- "@types/node": "24.13.3",
132
+ "@types/node": "24.19.2",
133
133
  "@vitest/coverage-v8": "4.1.12",
134
- "aws-cdk-lib": "2.262.2",
135
- "constructs": "10.7.2",
134
+ "aws-cdk-lib": "2.275.0",
135
+ "constructs": "10.8.1",
136
136
  "date-fns": "4.4.0",
137
- "es-toolkit": "1.50.0",
137
+ "es-toolkit": "1.53.2",
138
138
  "etag": "1.8.1",
139
139
  "geojson-validation": "1.0.2",
140
- "ky": "2.0.2",
141
- "lefthook": "2.1.10",
140
+ "ky": "2.2.0",
141
+ "lefthook": "2.2.2",
142
142
  "madge": "8.0.0",
143
- "pg-native": "3.8.0",
144
- "pg-promise": "12.7.0",
145
- "pg-query-stream": "4.16.0",
146
- "rimraf": "6.1.3",
147
- "sort-package-json": "4.0.0",
143
+ "pg-native": "3.9.1",
144
+ "pg-promise": "12.7.1",
145
+ "pg-query-stream": "4.17.0",
146
+ "rimraf": "6.1.4",
147
+ "sort-package-json": "4.1.0",
148
148
  "typescript": "5.9.3",
149
- "undici": "8.12.2",
149
+ "undici": "8.12.4",
150
150
  "velocityjs": "2.1.7",
151
151
  "vitest": "4.1.12",
152
152
  "zod": "4.6.7"
153
153
  },
154
154
  "peerDependencies": {
155
- "@aws-sdk/client-api-gateway": "3.1098.0",
156
- "@aws-sdk/client-s3": "3.1098.0",
157
- "@aws-sdk/client-secrets-manager": "3.1098.0",
158
- "@aws-sdk/client-sns": "3.1098.0",
159
- "@aws-sdk/lib-storage": "3.1098.0",
155
+ "@aws-sdk/client-api-gateway": "3.1163.0",
156
+ "@aws-sdk/client-s3": "3.1163.0",
157
+ "@aws-sdk/client-secrets-manager": "3.1163.0",
158
+ "@aws-sdk/client-sns": "3.1163.0",
159
+ "@aws-sdk/lib-storage": "3.1163.0",
160
160
  "@date-fns/tz": "1.5.0",
161
- "@smithy/fetch-http-handler": "5.6.13",
162
- "@smithy/node-http-handler": "4.9.13",
163
- "aws-cdk-lib": "2.262.2",
164
- "constructs": "10.7.2",
161
+ "@smithy/fetch-http-handler": "5.8.1",
162
+ "@smithy/node-http-handler": "4.14.2",
163
+ "aws-cdk-lib": "2.275.0",
164
+ "constructs": "10.8.1",
165
165
  "date-fns": "4.4.0",
166
- "es-toolkit": "1.50.0",
166
+ "es-toolkit": "1.53.2",
167
167
  "geojson-validation": "1.0.2",
168
- "ky": "2.0.2",
169
- "pg-native": "3.8.0",
170
- "pg-promise": "12.7.0",
171
- "undici": "8.12.2",
168
+ "ky": "2.2.0",
169
+ "pg-native": "3.9.1",
170
+ "pg-promise": "12.7.1",
171
+ "undici": "8.12.4",
172
172
  "zod": "4.6.7"
173
173
  },
174
174
  "engines": {