Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use node: protocol for Node.js core modules #1261

Merged
merged 1 commit into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/init.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { promises as fsPromises, existsSync } from "fs";
import { join, relative, resolve } from "path";
import { inspect } from "util";
import { promises as fsPromises, existsSync } from "node:fs";
import { join, relative, resolve } from "node:path";
import { inspect } from "node:util";
import { defaultLogger } from "./logger.js";

const { copyFile, mkdir, readFile, writeFile, unlink } = fsPromises;
Expand Down
2 changes: 1 addition & 1 deletion lib/logger.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EOL } from "os";
import { EOL } from "node:os";

/** @type {import("../types/ybiq").Logger} */
export const defaultLogger = (msg) => {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@
"rules": {
"import/extensions": "off",
"import/no-internal-modules": "off",
"import/prefer-default-export": "off"
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"node/no-missing-import": "off"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
"overrides": [
{
Expand All @@ -165,6 +167,7 @@
},
"rules": {
"import/no-internal-modules": "off",
"import/no-unresolved": "off",
"node/no-unsupported-features/es-syntax": "off"
}
},
Expand Down
6 changes: 3 additions & 3 deletions test/init.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
import { tmpdir } from "os";
import { join, resolve } from "path";
import { copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join, resolve } from "node:path";
import { init } from "../lib/init.js";
import { exec } from "./helpers/exec.js";
import { pkg } from "./helpers/pkg.js";
Expand Down
1 change: 0 additions & 1 deletion test/types.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved, node/no-missing-import -- Prevent error: TS7016: Could not find a declaration file for module '../lib/index.js'
import * as ybiq from "..";

const noop = (arg?: unknown): void => {
Expand Down