Skip to content

Commit 8cd482c

Browse files
committed
refactor: update module resolution and remove esm compatibility script
1 parent a4af307 commit 8cd482c

22 files changed

+57
-95
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
},
1111
"scripts": {
1212
"build": "tsc",
13-
"postbuild": "node scripts/esm-compatibility.js",
1413
"test": "jest",
1514
"test:watch": "jest --watch",
1615
"test:coverage": "jest --coverage",

scripts/esm-compatibility.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/helpers/array.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Helper } from "../helper-registry";
1+
import type { Helper } from "../helper-registry.js";
22

33
/**
44
* Returns all of the items in an array after the specified index. Opposite of before.

src/helpers/collections.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Helper } from "../helper-registry";
1+
import type { Helper } from "../helper-registry.js";
22

33
/**
44
* Checks if a collection (array, object, or string) is empty.

src/helpers/comparison.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Helper } from "../helper-registry";
1+
import type { Helper } from "../helper-registry.js";
22

33
/**
44
* Helper that renders the block if both of the given values are truthy.

src/helpers/ctrf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-ignore - ansi-to-html doesn't have type definitions
22
import Convert from "ansi-to-html";
33
import type { Test } from "ctrf";
4-
import type { Helper } from "../helper-registry";
4+
import type { Helper } from "../helper-registry.js";
55

66
/**
77
* Sorts tests by their failure rate in descending order, showing the most unreliable tests first.

src/helpers/date.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Helper } from "../helper-registry";
1+
import type { Helper } from "../helper-registry.js";
22

33
/**
44
* Handlebars helper that returns the current year.

src/helpers/fs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { readdirSync, readFileSync } from "node:fs";
22
import { resolve } from "node:path";
3-
import type { Helper } from "../helper-registry";
3+
import type { Helper } from "../helper-registry.js";
44

55
/**
66
* Read a file from the file system. Useful for including file contents in CTRF test reports or templates.

src/helpers/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Helper } from "../helper-registry";
1+
import type { Helper } from "../helper-registry.js";
22

33
/**
44
* Retrieves a GitHub octicon URL for a given test state or category.

src/helpers/inflection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Helper } from "../helper-registry";
1+
import type { Helper } from "../helper-registry.js";
22

33
/**
44
* Returns either the `singular` or `plural` inflection of a word based on

0 commit comments

Comments
 (0)