Skip to content

Chore bump deps more #5035

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

Merged
merged 74 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
8493279
refactor: logic on async
alexander-akait Jan 23, 2024
9caa91f
chore: bump some deps
alexander-akait Jan 23, 2024
cab7edb
chore: fix commands
alexander-akait Jan 23, 2024
a0e1dcc
test: debug
alexander-akait Jan 23, 2024
dd033a0
test: debug
alexander-akait Jan 23, 2024
058cb0d
chore(deps): update `open`
alexander-akait Jan 24, 2024
55d3c75
chore(deps): update
alexander-akait Feb 6, 2024
cc84028
test: fix
alexander-akait Feb 6, 2024
9f2556c
test: fix
alexander-akait Feb 6, 2024
02175c7
test: update
alexander-akait Feb 6, 2024
22b4f6d
test: update
alexander-akait Feb 6, 2024
82081fb
test: update
alexander-akait Feb 6, 2024
9a5af76
test: update
alexander-akait Feb 6, 2024
7294b16
test: debug
alexander-akait Feb 6, 2024
6843f9a
test: debug
alexander-akait Feb 6, 2024
885fddf
test: debug
alexander-akait Feb 6, 2024
a7f619a
test: debug
alexander-akait Feb 6, 2024
703af46
test: debug
alexander-akait Feb 6, 2024
0d3aea9
test: debug
alexander-akait Feb 6, 2024
bc51a7c
test: debug
alexander-akait Feb 7, 2024
5dbbd40
test: debug
alexander-akait Feb 7, 2024
f5f606b
test: debug
alexander-akait Feb 7, 2024
c67ba20
chore(deps): update
alexander-akait Feb 7, 2024
c5cf96a
test: debug
alexander-akait Feb 7, 2024
349fe16
test: debug
alexander-akait Feb 7, 2024
8034486
test: debug
alexander-akait Feb 7, 2024
a6783c9
test: debug
alexander-akait Feb 7, 2024
f66493d
test: fix
alexander-akait Feb 7, 2024
3b1341a
test: debug
alexander-akait Feb 7, 2024
a6ab861
test: debug
alexander-akait Feb 7, 2024
013b3e2
test: debug
alexander-akait Feb 7, 2024
3e19ca1
test: debug
alexander-akait Feb 7, 2024
e86ecd2
test: debug
alexander-akait Feb 7, 2024
e8147cb
test: debug
alexander-akait Feb 7, 2024
549bbb7
test: debug
alexander-akait Feb 7, 2024
b732d09
test: debug
alexander-akait Feb 7, 2024
94f0804
test: debug
alexander-akait Feb 7, 2024
7aa7d2e
test: debug
alexander-akait Feb 7, 2024
e79bfc1
test: debug
alexander-akait Feb 7, 2024
726fba7
test: debug
alexander-akait Feb 7, 2024
7d6010c
test: debug
alexander-akait Feb 7, 2024
eb70083
test: debug
alexander-akait Feb 7, 2024
b19823e
test: debug
alexander-akait Feb 7, 2024
3a36caf
test: debug
alexander-akait Feb 7, 2024
81728cf
test: debug
alexander-akait Feb 7, 2024
a9e5664
test: debug
alexander-akait Feb 7, 2024
6b0de0a
test: debug
alexander-akait Feb 7, 2024
b0c8fc4
test: debug
alexander-akait Feb 7, 2024
a9c0e5d
test: debug
alexander-akait Feb 7, 2024
76958bf
test: debug
alexander-akait Feb 7, 2024
ead961a
test: debug
alexander-akait Feb 7, 2024
3bdfd72
test: debug
alexander-akait Feb 7, 2024
4de7c93
test: debug
alexander-akait Feb 7, 2024
f64de9a
test: debug
alexander-akait Feb 7, 2024
91202fe
test: debug
alexander-akait Feb 7, 2024
e3a6dcd
test: debug
alexander-akait Feb 7, 2024
8f50ed2
test: debug
alexander-akait Feb 8, 2024
86d7f4d
test: debug
alexander-akait Feb 8, 2024
9c23b4f
test: debug
alexander-akait Feb 8, 2024
5b20550
test: debug
alexander-akait Feb 8, 2024
698f01d
test: debug
alexander-akait Feb 8, 2024
10978ae
test: debug
alexander-akait Feb 8, 2024
67ea20a
test: debug
alexander-akait Feb 8, 2024
404a7f6
test: debug
alexander-akait Feb 8, 2024
bee9fed
test: debug
alexander-akait Feb 8, 2024
f8c0794
test: debug
alexander-akait Feb 8, 2024
da3a7eb
test: debug
alexander-akait Feb 8, 2024
7809cc5
test: debug
alexander-akait Feb 8, 2024
298058a
test: debug
alexander-akait Feb 8, 2024
8c06e30
test: debug
alexander-akait Feb 8, 2024
9c55161
test: debug
alexander-akait Feb 8, 2024
5d10ad4
test: debug
alexander-akait Feb 8, 2024
047fe2a
test: debug
alexander-akait Feb 8, 2024
3de293e
test: debug
alexander-akait Feb 8, 2024
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
15 changes: 13 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Install dependencies for Node.js@18
run: |
npm i p-retry@^4.5.0 open@^8.0.9
node ./scripts/prepare-test-for-old-node.js
if: matrix.node-version == '18.x'

- name: Setup firefox
if: matrix.os != 'windows-latest'
uses: browser-actions/setup-firefox@latest
Expand All @@ -99,13 +105,18 @@ jobs:
- name: Link webpack-dev-server
run: |
cp -R client tmp-client
npm link --ignore-scripts
npm link webpack-dev-server --ignore-scripts
npm link --ignore-scripts || true
npm link webpack-dev-server --ignore-scripts || true
rm -r client
cp -R tmp-client client

- name: Run tests for webpack version ${{ matrix.webpack-version }}
run: node_modules/.bin/jest --coverage --ci --shard=${{ matrix.shard }}
if: matrix.node-version == '18.x'

- name: Run tests for webpack version ${{ matrix.webpack-version }}
run: npm run test:coverage -- --ci --shard=${{ matrix.shard }}
if: matrix.node-version != '18.x'

- name: Submit coverage data to codecov
uses: codecov/codecov-action@v3
Expand Down
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
28 changes: 14 additions & 14 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ class Server {
static async internalIP(family) {
try {
const { gateway } = await require("default-gateway")[family]();

return Server.findIp(gateway);
} catch {
// ignore
Expand All @@ -369,6 +370,7 @@ class Server {
static internalIPSync(family) {
try {
const { gateway } = require("default-gateway")[family].sync();

return Server.findIp(gateway);
} catch {
// ignore
Expand Down Expand Up @@ -405,7 +407,7 @@ class Server {
return port;
}

const pRetry = require("p-retry");
const pRetry = (await import("p-retry")).default;
const getPort = require("./getPort");
const basePort =
typeof process.env.WEBPACK_DEV_SERVER_BASE_PORT !== "undefined"
Expand Down Expand Up @@ -1115,15 +1117,13 @@ class Server {

// cert is more than 30 days old, kill it with fire
if ((now - Number(certificateStat.ctime)) / certificateTtl > 30) {
const { promisify } = require("util");
const rimraf = require("rimraf");
const del = promisify(rimraf);
const { rimraf } = require("rimraf");

this.logger.info(
"SSL certificate is more than 30 days old. Removing...",
);

await del(certificatePath);
await rimraf(certificatePath);

certificateExists = false;
}
Expand Down Expand Up @@ -2480,10 +2480,10 @@ class Server {
/**
* @private
* @param {string} defaultOpenTarget
* @returns {void}
* @returns {Promise<void>}
*/
openBrowser(defaultOpenTarget) {
const open = require("open");
async openBrowser(defaultOpenTarget) {
const open = (await import("open")).default;

Promise.all(
/** @type {NormalizedOpen[]} */
Expand Down Expand Up @@ -2568,9 +2568,9 @@ class Server {

/**
* @private
* @returns {void}
* @returns {Promise<void>}
*/
logStatus() {
async logStatus() {
const { isColorSupported, cyan, red } = require("colorette");

/**
Expand Down Expand Up @@ -2680,13 +2680,13 @@ class Server {
if (parsedIP.range() === "unspecified") {
localhost = prettyPrintURL("localhost");

const networkIPv4 = Server.internalIPSync("v4");
const networkIPv4 = await Server.internalIP("v4");

if (networkIPv4) {
networkUrlIPv4 = prettyPrintURL(networkIPv4);
}

const networkIPv6 = Server.internalIPSync("v6");
const networkIPv6 = await Server.internalIP("v6");

if (networkIPv6) {
networkUrlIPv6 = prettyPrintURL(networkIPv6);
Expand Down Expand Up @@ -2758,7 +2758,7 @@ class Server {
: this.options.host,
);

this.openBrowser(openTarget);
await this.openBrowser(openTarget);
}
}

Expand Down Expand Up @@ -3139,7 +3139,7 @@ class Server {
this.runBonjour();
}

this.logStatus();
await this.logStatus();

if (typeof this.options.onListening === "function") {
this.options.onListening(this);
Expand Down
Loading