diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index b0672d434c355..d192c379f4fcf 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -61,7 +61,7 @@ "bootstrap": "^3.4.1", "brace": "^0.11.1", "broadcast-channel": "^4.10.0", - "chrono-node": "^2.2.6", + "chrono-node": "^2.7.5", "classnames": "^2.2.5", "core-js": "^3.6.5", "d3-scale": "^2.1.2", @@ -28295,11 +28295,14 @@ "dev": true }, "node_modules/chrono-node": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/chrono-node/-/chrono-node-2.2.6.tgz", - "integrity": "sha512-ahgxpY4ihg3frV5t7pZYrS0Iap5MErTQ7whVNBxbiLjplc2HhGwj3zgr0dEnJos/FAuZVjrHoky8J9YiNc5ZKQ==", + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/chrono-node/-/chrono-node-2.7.5.tgz", + "integrity": "sha512-VJWqFN5rWmXVvXAxOD4i0jX8Tb4cLswaslyaAFhxM45zNXPsZleygPbgiaYBD7ORb9fj07zBgJb0Q6eKL+0iJg==", "dependencies": { "dayjs": "^1.10.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/ci-info": { @@ -93924,9 +93927,9 @@ } }, "chrono-node": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/chrono-node/-/chrono-node-2.2.6.tgz", - "integrity": "sha512-ahgxpY4ihg3frV5t7pZYrS0Iap5MErTQ7whVNBxbiLjplc2HhGwj3zgr0dEnJos/FAuZVjrHoky8J9YiNc5ZKQ==", + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/chrono-node/-/chrono-node-2.7.5.tgz", + "integrity": "sha512-VJWqFN5rWmXVvXAxOD4i0jX8Tb4cLswaslyaAFhxM45zNXPsZleygPbgiaYBD7ORb9fj07zBgJb0Q6eKL+0iJg==", "requires": { "dayjs": "^1.10.0" } diff --git a/superset-frontend/package.json b/superset-frontend/package.json index dbdf90a13994b..d513517d33538 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -127,7 +127,7 @@ "bootstrap": "^3.4.1", "brace": "^0.11.1", "broadcast-channel": "^4.10.0", - "chrono-node": "^2.2.6", + "chrono-node": "^2.7.5", "classnames": "^2.2.5", "core-js": "^3.6.5", "d3-scale": "^2.1.2", diff --git a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx index f2e3d33581f0b..9258b33f53c14 100644 --- a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx @@ -46,7 +46,9 @@ const getJSONSchema = () => { if (value.default && value.format === 'date-time') { jsonSchema.properties[key] = { ...value, - default: chrono.parseDate(value.default).toISOString(), + default: value.default + ? chrono.parseDate(value.default)?.toISOString() + : null, }; } },