Skip to content

Commit

Permalink
Merge pull request #51 from bloczjs/Ayc0/node-14
Browse files Browse the repository at this point in the history
[gh action] drop node 14 and use new JSON import syntax
  • Loading branch information
Ayc0 authored Jun 6, 2022
2 parents 6eb04ab + aa84ff3 commit 373e94c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion packages/tests/src/__tests__/esm.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as ReactResponsive from "@blocz/react-responsive";
import packageJSON from "@blocz/react-responsive/package.json";
import packageJSON from "@blocz/react-responsive/package.json" assert { type: "json" };

console.log("Didn’t crash");
11 changes: 4 additions & 7 deletions packages/tests/src/__tests__/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ describe("Important files should be resolvable", () => {

it("should work in a ESM context", () => {
expect(
execSync(
"node --experimental-json-modules ./esm.mjs",
{
cwd: __dirname,
encoding: "utf-8",
},
),
execSync("node ./esm.mjs", {
cwd: __dirname,
encoding: "utf-8",
}),
).toBe("Didn’t crash\n");
});
});
Expand Down

0 comments on commit 373e94c

Please sign in to comment.