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: update dependencies #612

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- run: npm install

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [20]
node-version: [20, 22]

runs-on: ${{ matrix.os }}

Expand Down
34 changes: 19 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"bin": {
"eik": "index.js"
},
"engines": {
"node": ">=20.5.0"
},
"files": [
"CHANGELOG.md",
"package.json",
Expand All @@ -21,10 +24,10 @@
],
"scripts": {
"clean": "rimraf .tap node_modules types",
"test": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage",
"test:integration": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage test/integration/**/*.test.mjs",
"test:unit": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage test/*.test.mjs",
"test:tasks": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage test/tasks/*.test.mjs",
"test": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 240 --disable-coverage",
"test:integration": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 240 --disable-coverage test/integration/**/*.test.mjs",
"test:unit": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 240 --disable-coverage test/*.test.mjs",
"test:tasks": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 240 --disable-coverage test/tasks/*.test.mjs",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"format:check": "prettier -c .",
Expand All @@ -38,39 +41,40 @@
"author": "",
"license": "MIT",
"dependencies": {
"@eik/common": "4.1.1",
"@eik/common": "5.0.0",
"abslog": "2.4.4",
"bytes": "3.1.2",
"chalk": "5.3.0",
"date-fns": "3.6.0",
"date-fns": "4.1.0",
"form-data": "4.0.1",
"gzip-size": "7.0.0",
"make-dir": "5.0.0",
"ora": "8.1.1",
"rimraf": "6.0.1",
"semver": "7.6.3",
"ssri": "10.0.6",
"ssri": "12.0.0",
"tar": "7.4.3",
"yargs": "17.7.2",
"yargs-parser": "21.1.1"
},
"devDependencies": {
"@eik/eslint-config": "1.0.4",
"@eik/eslint-config": "1.0.5",
"@eik/prettier-config": "1.0.1",
"@eik/semantic-release-config": "1.0.0",
"@eik/service": "2.3.2",
"@eik/sink-memory": "1.1.2",
"@eik/service": "5.0.0",
"@eik/sink-memory": "2.0.0",
"@eik/typescript-config": "1.0.0",
"@types/ssri": "7.1.5",
"@types/yargs": "17.0.33",
"cross-env": "7.0.3",
"eslint": "9.11.1",
"fastify": "4.28.1",
"eslint": "9.14.0",
"fastify": "5.1.0",
"fs-extra": "11.2.0",
"npm-run-all2": "5.0.2",
"npm-run-all2": "7.0.1",
"prettier": "3.3.3",
"semantic-release": "24.0.0",
"semantic-release": "24.2.0",
"semantic-release-slack-bot": "4.0.2",
"tap": "21.0.1",
"typescript": "5.5.4"
"typescript": "5.6.3"
}
}
9 changes: 6 additions & 3 deletions test/alias.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
13 changes: 7 additions & 6 deletions test/integration/alias-legacy.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ function exec(cmd) {
}

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down Expand Up @@ -75,9 +78,7 @@ beforeEach(async (t) => {
t.context.token = token;
});

afterEach(async (t) => {
await t.context.server.close();
});
afterEach((t) => t.context.server.close());

test("eik package-alias <name> <version> <alias>", async (t) => {
const { address, token, folder: cwd } = t.context;
Expand Down
15 changes: 8 additions & 7 deletions test/integration/alias.test.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fastify from "fastify";
import { promises as fs } from "node:fs";
import os, { type } from "node:os";
import os from "node:os";
import { exec as execCallback } from "child_process";
import { join, basename } from "node:path";
import { test, beforeEach, afterEach } from "tap";
Expand All @@ -22,10 +22,13 @@ function exec(cmd) {
}

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down Expand Up @@ -75,9 +78,7 @@ beforeEach(async (t) => {
t.context.token = token;
});

afterEach(async (t) => {
await t.context.server.close();
});
afterEach((t) => t.context.server.close());

test("packages: eik alias <name> <version> <alias>", async (t) => {
const { address, token, folder: cwd } = t.context;
Expand Down
9 changes: 6 additions & 3 deletions test/integration/integrity.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const service = new EikService({ customSink: memSink });
server.register(service.api());
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
9 changes: 6 additions & 3 deletions test/integration/login.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const service = new EikService({ customSink: memSink });
server.register(service.api());
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
9 changes: 6 additions & 3 deletions test/integration/map.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const service = new EikService({ customSink: memSink });
server.register(service.api());
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
9 changes: 6 additions & 3 deletions test/integration/meta.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const service = new EikService({ customSink: memSink });
server.register(service.api());
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
13 changes: 7 additions & 6 deletions test/integration/package.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const service = new EikService({ customSink: memSink });
server.register(service.api());
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand All @@ -43,9 +46,7 @@ beforeEach(async (t) => {
t.context.token = token;
});

afterEach(async (t) => {
await t.context.server.close();
});
afterEach((t) => t.context.server.close());

test("eik package : package, details provided by eik.json file", async (t) => {
const assets = {
Expand Down
9 changes: 6 additions & 3 deletions test/integration/version.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ function exec(cmd, opts = {}) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const service = new EikService({ customSink: memSink });
server.register(service.api());
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
9 changes: 6 additions & 3 deletions test/integrity.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
9 changes: 6 additions & 3 deletions test/login.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ const __dirname = dirname(__filename);

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const service = new EikService({ customSink: memSink });
server.register(service.api());
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
9 changes: 6 additions & 3 deletions test/meta.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
23 changes: 17 additions & 6 deletions test/publish-files-definitions.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ const config = (files, server, token, cwd) => ({

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const service = new EikService({ customSink: memSink });
server.register(service.api());
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down Expand Up @@ -236,9 +239,13 @@ test("when a recursive glob is specified", async (t) => {
// @ts-expect-error
const { files } = await cli.publish(config(pattern, address, token, cwd));

t.equal(files[4].pathname, "/client.js", "client.js should be packaged at /");
t.equal(
files[11].pathname,
files.find((f) => f.pathname.endsWith("client.js")).pathname,
"/client.js",
"client.js should be packaged at /",
);
t.equal(
files.find((f) => f.pathname.endsWith("checkboxes.svg")).pathname,
"/icons/checkboxes.svg",
"svgs should be packaged under /icons",
);
Expand All @@ -252,7 +259,11 @@ test("when a non recursive glob is specified", async (t) => {

const nested = files.filter((file) => file.pathname.includes("icons"));

t.equal(files[4].pathname, "/client.js", "client.js should be packaged at /");
t.equal(
files.find((f) => f.pathname.endsWith("client.js")).pathname,
"/client.js",
"client.js should be packaged at /",
);
t.equal(nested.length, 0, "no nested files should be present");
});

Expand Down
9 changes: 6 additions & 3 deletions test/publish.map.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ const __dirname = dirname(__filename);

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const service = new EikService({ customSink: memSink });
server.register(service.api());
const server = fastify({
ignoreTrailingSlash: true,
forceCloseConnections: true,
});
const service = new EikService({ sink: memSink });
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
Loading