Skip to content

Commit

Permalink
fix: use userland module for punycode (#1596)
Browse files Browse the repository at this point in the history
* Use userland module for punycode

The slash at the end is necessary to use the userland module

* fix: Add @types/punycode as dev dependency

---------

Co-authored-by: Eli Frigo <ejfinf01@infinitymec.com>
  • Loading branch information
EliTheCoder and Eli Frigo committed Jan 31, 2024
1 parent 57998f2 commit 6a961b5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -68,6 +68,7 @@
"@types/lru-cache": "^5.1.1",
"@types/mocha": "^10.0.1",
"@types/node": "^16.18.38",
"@types/punycode": "^2.1.3",
"@types/sprintf-js": "^1.1.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/connector.ts
@@ -1,7 +1,7 @@
import net from 'net';
import dns, { type LookupAddress } from 'dns';

import * as punycode from 'punycode';
import * as punycode from 'punycode/';
import { AbortSignal } from 'node-abort-controller';
import AbortError from './errors/abort-error';

Expand Down
2 changes: 1 addition & 1 deletion src/sender.ts
@@ -1,7 +1,7 @@
import dgram from 'dgram';
import dns from 'dns';
import net from 'net';
import * as punycode from 'punycode';
import * as punycode from 'punycode/';
import { AbortSignal } from 'node-abort-controller';

import AbortError from './errors/abort-error';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/connector-test.js
@@ -1,6 +1,6 @@
const Mitm = require('mitm');
const sinon = require('sinon');
const punycode = require('punycode');
const punycode = require('punycode/');
const assert = require('chai').assert;
const { AbortController } = require('node-abort-controller');
const AggregateError = require('es-aggregate-error');
Expand Down
2 changes: 1 addition & 1 deletion test/unit/instance-lookup-test.js
@@ -1,5 +1,5 @@
const sinon = require('sinon');
const punycode = require('punycode');
const punycode = require('punycode/');
const assert = require('chai').assert;
const dgram = require('dgram');
const { AbortController } = require('node-abort-controller');
Expand Down

0 comments on commit 6a961b5

Please sign in to comment.