Skip to content

Commit

Permalink
refactor: use node: specifier imports and full relative paths (#366)
Browse files Browse the repository at this point in the history
* refactor: replace NodeJS internal module imports with `node:` specifier imports

* refactor: use full relative paths

---------

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
  • Loading branch information
wolfy1339 and nickfloyd committed Dec 1, 2023
1 parent 619b151 commit 60e53c6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
"functions": 100,
"lines": 100
}
},
"moduleNameMapper": {
"^(.+)\\.jsx?$": "$1"
}
},
"release": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check
import esbuild from "esbuild";
import { copyFile, readFile, writeFile, rm } from "fs/promises";
import { copyFile, readFile, writeFile, rm } from "node:fs/promises";
import { glob } from "glob";

/**
Expand Down
4 changes: 2 additions & 2 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { request } from "@octokit/request";
import fetchMock, { MockMatcherFunction } from "fetch-mock";
import fetchMock, { type MockMatcherFunction } from "fetch-mock";

import { createActionAuth } from "../src/index";
import { createActionAuth } from "../src/index.ts";

afterEach(() => {
delete process.env.GITHUB_ACTION;
Expand Down
19 changes: 10 additions & 9 deletions test/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"emitDeclarationOnly": false,
"noEmit": true,
"verbatimModuleSyntax": false
},
"include": [
"src/**/*"
]
"extends": "../tsconfig.json",
"compilerOptions": {
"emitDeclarationOnly": false,
"noEmit": true,
"verbatimModuleSyntax": false,
"allowImportingTsExtensions": true
},
"include": [
"src/**/*"
]
}

0 comments on commit 60e53c6

Please sign in to comment.