Skip to content

Commit 4529dd1

Browse files
committed
Migrate tsconfig.json from ESNext to NodeNext
1 parent c256e6d commit 4529dd1

11 files changed

Lines changed: 31 additions & 23 deletions

assertions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import assert from "node:assert/strict";
2-
import { assertValidFeatureReference } from "./assertions";
2+
import { assertValidFeatureReference } from "./assertions.js";
33

44
describe("assertValidReference()", function () {
55
it("throws if target ID is a move", function () {

assertions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { isOrdinaryFeatureData } from "./type-guards";
2-
import { FeatureData } from "./types";
3-
import { WebFeaturesData } from "./types.quicktype";
1+
import { isOrdinaryFeatureData } from "./type-guards.js";
2+
import { FeatureData } from "./types.js";
3+
import { WebFeaturesData } from "./types.quicktype.js";
44

55
/**
66
* Assert that a reference from one feature to another is an ordinary feature

index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import path from 'path';
44
import { Temporal } from '@js-temporal/polyfill';
55
import { fdir } from 'fdir';
66
import YAML from 'yaml';
7-
import { convertMarkdown } from "./text";
8-
import { GroupData, SnapshotData, WebFeaturesData } from './types';
7+
import { convertMarkdown } from "./text.js";
8+
import { GroupData, SnapshotData, WebFeaturesData } from './types.js';
99

1010
import { BASELINE_LOW_TO_HIGH_DURATION, coreBrowserSet, getStatus, parseRangedDateString } from 'compute-baseline';
1111
import { Compat } from 'compute-baseline/browser-compat-data';
12-
import { assertRequiredRemovalDateSet, assertValidFeatureReference } from './assertions';
13-
import { isMoved, isOrdinaryFeatureData, isSplit } from './type-guards';
12+
import { assertRequiredRemovalDateSet, assertValidFeatureReference } from './assertions.js';
13+
import { isMoved, isOrdinaryFeatureData, isSplit } from './type-guards.js';
1414

1515
// The longest name allowed, to allow for compact display.
1616
const nameMaxLength = 80;

scripts/dist.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import { isDeepStrictEqual } from "node:util";
1414
import winston from "winston";
1515
import YAML, { Document, Scalar, YAMLSeq } from "yaml";
1616
import yargs from "yargs";
17-
import type { FeatureData, FeatureMovedData, FeatureSplitData } from "../types";
17+
import type {
18+
FeatureData,
19+
FeatureMovedData,
20+
FeatureSplitData,
21+
} from "../types.js";
1822

1923
const compat = new Compat();
2024

scripts/find-ranged-headline-statuses.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { features } from "../index";
2-
import { isOrdinaryFeatureData } from "../type-guards";
1+
import { features } from "../index.js";
2+
import { isOrdinaryFeatureData } from "../type-guards.js";
33

44
for (const [key, data] of Object.entries(features)) {
55
if (isOrdinaryFeatureData(data)) {

scripts/inspect-feature.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { fileURLToPath } from "node:url";
66
import winston from "winston";
77
import YAML from "yaml";
88
import yargs from "yargs";
9-
import { features } from "..";
10-
import { defaultCompat } from "../packages/compute-baseline/dist/browser-compat-data/compat";
11-
import { feature } from "../packages/compute-baseline/dist/browser-compat-data/feature";
12-
import { SupportStatement } from "../packages/compute-baseline/dist/browser-compat-data/supportStatements";
13-
import { convertHTML } from "../text";
14-
import { FeatureData } from "../types";
9+
import { features } from "../index.js";
10+
import { defaultCompat } from "../packages/compute-baseline/dist/browser-compat-data/compat.js";
11+
import { feature } from "../packages/compute-baseline/dist/browser-compat-data/feature.js";
12+
import { SupportStatement } from "../packages/compute-baseline/dist/browser-compat-data/supportStatements.js";
13+
import { convertHTML } from "../text.js";
14+
import { FeatureData } from "../types.js";
1515

1616
const argv = yargs(process.argv.slice(2))
1717
.scriptName("dist")

scripts/remove-tagged-compat-features.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { isDeepStrictEqual } from "node:util";
88
import winston from "winston";
99
import YAML from "yaml";
1010
import yargs from "yargs";
11-
import { checkForStaleCompat } from "./dist";
11+
import { checkForStaleCompat } from "./dist.js";
1212

1313
const compat = new Compat();
1414

scripts/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Ajv from "ajv";
1+
import { Ajv } from "ajv";
22
import assert from "node:assert/strict";
33

44
import * as schema from "../schemas/data.schema.json" with { type: "json" };

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
"target": "esnext",
4-
"module": "esnext",
5-
"moduleResolution": "Bundler",
4+
"module": "nodenext",
5+
"moduleResolution": "nodenext",
66
"esModuleInterop": true,
77
"resolveJsonModule": true,
88
"noEmit": true

type-guards.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import type { FeatureData, FeatureMovedData, FeatureSplitData } from "./types";
1+
import type {
2+
FeatureData,
3+
FeatureMovedData,
4+
FeatureSplitData,
5+
} from "./types.js";
26

37
export function isOrdinaryFeatureData(x: unknown): x is FeatureData {
48
return typeof x === "object" && "kind" in x && x.kind === "feature";

0 commit comments

Comments
 (0)