Skip to content

Commit

Permalink
fix(bundling): compile distribution files so that they are compatible…
Browse files Browse the repository at this point in the history
… with node versions supporting esm
  • Loading branch information
giamir committed Oct 18, 2023
1 parent 31731e0 commit 95e3a68
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-students-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"axe-apca": patch
---

Compile distribution files so that they are compatible with node.js versions supporting ecmascript modules
2 changes: 1 addition & 1 deletion src/apca-bronze.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ConformanceThresholdFn } from ".";
import type { ConformanceThresholdFn } from "./index.js";

// APCA Bronze Level Conformance
// https://readtech.org/ARC/tests/visual-readability-contrast/?tn=criterion
Expand Down
2 changes: 1 addition & 1 deletion src/apca-silver-plus.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ConformanceThresholdFn } from ".";
import type { ConformanceThresholdFn } from "./index.js";

const silverPlusAPCALookupTable = [
// See https://readtech.org/ARC/tests/visual-readability-contrast/?tn=criterion (May 22, 2022)
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { calcAPCA } from "apca-w3";
import axe, { type Check, Rule } from "axe-core";
import APCABronzeConformanceThresholdFn from "./apca-bronze";
import APCASilverPlusConformanceThresholdFn from "./apca-silver-plus";
import APCABronzeConformanceThresholdFn from "./apca-bronze.js";
import APCASilverPlusConformanceThresholdFn from "./apca-silver-plus.js";

type ConformanceLevel = "bronze" | "silver" | "custom";

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"strict": true,
"target": "esnext",
"moduleResolution": "bundler",
"module": "nodenext",
"declaration": true,
"outDir": "./dist",
},
Expand Down

0 comments on commit 95e3a68

Please sign in to comment.