Skip to content

Commit 1fc7622

Browse files
authored
Merge pull request #234 from msgpack/test-node-20
fix CI, add node v20, remove node v14
2 parents 1234418 + 5b0f25e commit 1fc7622

24 files changed

+29
-28
lines changed

.github/workflows/ci.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
strategy:
1414
matrix:
1515
node-version:
16-
- '14'
1716
- '16'
1817
- '18'
18+
- '20'
1919

2020
steps:
2121
- uses: actions/checkout@v3
@@ -25,7 +25,6 @@ jobs:
2525
cache: npm
2626
node-version: ${{ matrix.node-version }}
2727

28-
- run: npm install -g npm
2928
- run: npm install -g nyc codecov
3029
- run: npm ci
3130
- run: npm run test:cover
@@ -43,7 +42,7 @@ jobs:
4342
uses: actions/setup-node@v2
4443
with:
4544
cache: npm
46-
node-version: '16'
45+
node-version: '18'
4746
- run: npm install -g npm
4847
- run: npm ci
4948
- run: npm run test:browser -- --browsers ${{ matrix.browser }}

.github/workflows/fuzz.yml

+2
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,7 @@ jobs:
2121
cache: npm
2222
node-version: "18"
2323

24+
# npm@9 may fail with https://github.com/npm/cli/issues/6723
25+
- run: npm install -g npm@8
2426
- run: npm ci
2527
- run: npm run test:fuzz

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type { EncodeOptions };
88
import { decode, decodeMulti } from "./decode";
99
export { decode, decodeMulti };
1010
import type { DecodeOptions } from "./decode";
11-
export { DecodeOptions };
11+
export type { DecodeOptions };
1212

1313
import { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream } from "./decodeAsync";
1414
export { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream };

test/CachedKeyDecoder.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { CachedKeyDecoder, KeyDecoder } from "../src/CachedKeyDecoder";
33
import { utf8EncodeJs, utf8Count } from "../src/utils/utf8";
44

test/ExtensionCodec.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import assert from "node:assert";
2-
import util from "node:util";
1+
import assert from "assert";
2+
import util from "util";
33
import { encode, decode, ExtensionCodec, decodeAsync } from "../src";
44

55
describe("ExtensionCodec", () => {

test/bigint64.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decode } from "../src";
33

44
describe("useBigInt64: true", () => {

test/codec-bigint.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decode, ExtensionCodec, DecodeError } from "../src";
33

44
// There's a built-in `useBigInt64: true` option, but a custom codec might be

test/codec-float.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { decode } from "../src";
33
import * as ieee754 from "ieee754";
44

test/codec-int.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { setInt64, getInt64, getUint64, setUint64 } from "../src/utils/int";
33

44
const INT64SPECS = {

test/codec-timestamp.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import assert from "node:assert";
2-
import util from "node:util";
1+
import assert from "assert";
2+
import util from "util";
33
import {
44
encode,
55
decode,

test/decode-blob.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decode, decodeAsync } from "@msgpack/msgpack";
33

44
(typeof Blob !== "undefined" ? describe : describe.skip)("Blob", () => {

test/decode-max-length.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decode, decodeAsync } from "../src";
33
import type { DecoderOptions } from "../src";
44

test/decodeArrayStream.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decodeArrayStream } from "../src";
33

44
describe("decodeArrayStream", () => {

test/decodeAsync.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decodeAsync } from "../src";
33

44
describe("decodeAsync", () => {

test/decodeMulti.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decodeMulti } from "@msgpack/msgpack";
33

44
describe("decodeMulti", () => {

test/decodeMultiStream.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decodeMultiStream } from "@msgpack/msgpack";
33

44
describe("decodeStream", () => {

test/edge-cases.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// kind of hand-written fuzzing data
22
// any errors should not break Encoder/Decoder instance states
3-
import assert from "node:assert";
3+
import assert from "assert";
44
import { encode, decodeAsync, decode, Encoder, Decoder, decodeMulti, decodeMultiStream } from "../src";
55
import { DataViewIndexOutOfBoundsError } from "../src/Decoder";
66

test/encode.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decode } from "@msgpack/msgpack";
33

44
describe("encode", () => {

test/msgpack-ext.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from "node:assert";
1+
import assert from "assert";
22
import { encode, decode, ExtData } from "../src";
33

44
function seq(n: number) {

test/msgpack-test-suite.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import assert from "node:assert";
2-
import util from "node:util";
1+
import assert from "assert";
2+
import util from "util";
33
import { Exam } from "msgpack-test-js";
44
import { MsgTimestamp } from "msg-timestamp";
55
import { encode, decode, ExtensionCodec, EXT_TIMESTAMP, encodeTimeSpecToTimestamp } from "@msgpack/msgpack";

test/prototype-pollution.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { throws } from "node:assert";
1+
import { throws } from "assert";
22
import { encode, decode, DecodeError } from "@msgpack/msgpack";
33

44
describe("prototype pollution", () => {

test/readme.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { deepStrictEqual } from "node:assert";
1+
import { deepStrictEqual } from "assert";
22
import { encode, decode } from "@msgpack/msgpack";
33

44
describe("README", () => {

test/reuse-instances.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { deepStrictEqual } from "node:assert";
1+
import { deepStrictEqual } from "assert";
22
import { Encoder, Decoder, decode } from "@msgpack/msgpack";
33

44
const createStream = async function* (...args: any) {

test/whatwg-streams.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { deepStrictEqual } from "node:assert";
1+
import { deepStrictEqual } from "assert";
22
import { decodeAsync, encode, decodeArrayStream } from "@msgpack/msgpack";
33

44
const isReadableStreamConstructorAvailable: boolean = (() => {

0 commit comments

Comments
 (0)