Skip to content
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
27 changes: 13 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cbor-monorepo",
"private": true,
"main": "./packages/cbor/lib/cbor.js",
"version": "10.0.3",
"version": "10.0.4",
"author": {
"name": "Joe Hildebrand",
"email": "joe-github@cursive.net"
Expand All @@ -13,7 +13,7 @@
"docs": "jsdoc -c .jsdoc.conf",
"lint": "eslint .",
"test": "ava packages/*/test/*.ava.js",
"test:versions": "nve --continue --arch x64 --parallel 23,22,20,18 npm test",
"test:versions": "nve --continue --arch x64 --parallel 24,22,20,18 npm test",
"test:bigendian": "docker run --rm -it -v ${PWD}:/root/cbor -w /root/cbor s390x/node npm test",
"test:spot-check": "ava test/*.ava.js && CBOR_PACKAGE=${INIT_CWD}/packages/cbor-web/dist/cbor.js npm run test",
"test:web": "node packages/puppeteer-demo/index.js",
Expand All @@ -29,33 +29,32 @@
"nofilter": "^3.0.2"
},
"devDependencies": {
"@cto.af/eslint-config": "^6.0.0",
"@cto.af/monopub": "0.1.3",
"@parcel/core": "2.14.4",
"@parcel/optimizer-data-url": "2.14.4",
"@parcel/transformer-inline-string": "2.14.4",
"ava": "6.2.0",
"@cto.af/eslint-config": "^6.0.9",
"@cto.af/monopub": "1.2.1",
"@eslint/markdown": "6.6.0",
"@parcel/core": "2.15.4",
"@parcel/optimizer-data-url": "2.15.4",
"@parcel/transformer-inline-string": "2.15.4",
"ava": "6.4.0",
"bignumber.js": "^9.3.0",
"buffer": "^6.0.3",
"copyfiles": "2.4.1",
"docdash": "2.0.2",
"eslint": "^9.25.1",
"eslint": "^9.29.0",
"eslint-plugin-ava": "^15.0.1",
"eslint-plugin-jsdoc": "^50.6.11",
"eslint-plugin-markdown": "^5.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-jsdoc": "^51.1.1",
"events": "^3.3.0",
"jsdoc": "^4.0.4",
"minami": "*",
"nve": "^18.0.2",
"nve": "^18.0.3",
"nyc": "^17.1.0",
"process": "^0.11.10",
"rimraf": "5.0.10",
"stream-browserify": "^3.0.0",
"svgo": "3.3.2",
"typescript": "^5.8.3"
},
"packageManager": "pnpm@10.10.0",
"packageManager": "pnpm@10.12.1",
"engines": {
"node": ">=20"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/browserify-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browserify-demo",
"version": "10.0.3",
"version": "10.0.4",
"description": "",
"private": true,
"scripts": {
Expand All @@ -18,14 +18,14 @@
"author": "Joe Hildebrand <joe-github@cursive.net>",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.26.10",
"@babel/core": "^7.27.4",
"babelify": "^10.0.0",
"browserify": "^17.0.1",
"cbor-bigdecimal": "^10.0.3",
"copyfiles": "^2.4.1",
"node-inspect-extracted": "*",
"rimraf": "5.0.10",
"terser": "^5.39.0"
"terser": "^5.43.1"
},
"engines": {
"node": ">=20"
Expand Down
4 changes: 2 additions & 2 deletions packages/cbor-bigdecimal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cbor-bigdecimal",
"version": "10.0.3",
"version": "10.0.4",
"description": "Plugin for node-cbor to add BigDecimal and BigFloat support. Requires bignumber.js",
"browser": "dist/cbor-bigdecimal.js",
"main": "./bigdecimal.js",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"devDependencies": {
"bignumber.js": "^9.3.0",
"webpack": "^5.99.7",
"webpack": "^5.99.9",
"webpack-cli": "^5.1.4"
},
"engines": {
Expand Down
7 changes: 7 additions & 0 deletions packages/cbor-cli/bin/cbor.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ const cborRepl = repl.start({
ignoreUndefined: true,
});

// Fix node v24.2 issue with close timing.
// See https://github.com/nodejs/node/issues/58784
const oclose = cborRepl.close;
cborRepl.close = (...args) => {
setTimeout(() => oclose.apply(cborRepl, args), 10);
};

// Import everything from the cbor package into the top level,
// and gussy up a few of them
for (const [k, v] of Object.entries(cbor)) {
Expand Down
6 changes: 3 additions & 3 deletions packages/cbor-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cbor-cli",
"version": "10.0.3",
"version": "10.0.4",
"description": "Command line tools to encode and parse data in the Concise Binary Object Representation (CBOR) data format (RFC8949).",
"repository": {
"type": "git",
Expand Down Expand Up @@ -41,7 +41,7 @@
"email": "joe-github@cursive.net"
},
"devDependencies": {
"marked": "^15.0.11",
"marked": "^15.0.12",
"marked-man": "^2.1.0",
"mock-stdio": "^1.0.3",
"nofilter": "^3.0.2",
Expand All @@ -54,7 +54,7 @@
"bignumber.js": "^9.3.0",
"cbor": "^10.0.3",
"cbor-bigdecimal": "^10.0.3",
"commander": "^13.1.0",
"commander": "^14.0.0",
"json-text-sequence": "1.0.1"
},
"engines": {
Expand Down
57 changes: 18 additions & 39 deletions packages/cbor-cli/test/exec.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ function exec(bin, opts = {}) {
...opts.env,
};
const args = opts.args || [];
if (process.platform === 'win32') {
args.unshift(bin);
[bin] = process.argv;
}
const c = spawn(bin, args, {
args.unshift(...process.execArgv, bin);
const c = spawn(process.execPath, args, {
stdio: 'pipe',
env,
});
Expand All @@ -45,13 +42,14 @@ function exec(bin, opts = {}) {
reject(err);
}
});
if (opts.stdin != null) {
c.stdin.write(opts.stdin);
}
c.stdin.end();
c.stdin.end(opts.stdin);
});
}

const env = {
NODE_REPL_HISTORY: '',
};

test('json2cbor', async t => {
let buf = await exec('json2cbor', {
stdin: '{"foo": false}',
Expand Down Expand Up @@ -140,10 +138,9 @@ test('cbor2comment', async t => {
test('cbor', async t => {
let buf = await exec(t.title, {
stdin: 'true',
env: {
NODE_REPL_HISTORY: '',
},
env,
});

// I might leave this in for a while to ensure that we're running the cbor
// version I think we should be in CI.
console.log('cli VERSION:', buf);
Expand All @@ -152,77 +149,59 @@ test('cbor', async t => {

await t.throwsAsync(() => exec(t.title, {
args: ['-t', 'foo'],
env: {
NODE_REPL_HISTORY: '',
},
env,
}));

buf = await exec(t.title, {
args: ['-t', 'diag', '-c'],
stdin: '0x818100',
env: {
NODE_REPL_HISTORY: '',
},
env,
});
t.regex(buf, /\[\[0\]\]\n/);

buf = await exec(t.title, {
args: ['-t', 'comment', '-c'],
stdin: '0x818100',
env: {
NODE_REPL_HISTORY: '',
},
env,
});
t.regex(buf, /Array, 1 item/);

buf = await exec(t.title, {
args: ['-t', 'js'],
stdin: '0xa1616101',
env: {
NODE_REPL_HISTORY: '',
},
env,
});
t.regex(buf, / a: 1\n/);
buf = await exec(t.title, {
stdin: 'comment("01")',
env: {
NODE_REPL_HISTORY: '',
},
env,
});
t.regex(buf, /Promise/);
t.regex(buf, /0x01/);
buf = await exec(t.title, {
stdin: 'diagnose("01")',
env: {
NODE_REPL_HISTORY: '',
},
env,
});
t.regex(buf, /Promise\n1\n/);

buf = await exec(t.title, {
args: ['-t', 'd'],
stdin: '0x81',
env: {
NODE_REPL_HISTORY: '',
},
env,
});
t.regex(buf, /Error: unexpected end of input/);

buf = await exec(t.title, {
args: ['-t', 'c'],
stdin: '0x81',
env: {
NODE_REPL_HISTORY: '',
},
env,
});
t.regex(buf, /Error: unexpected end of input/);

buf = await exec(t.title, {
args: ['-t', 'javascript'],
stdin: '0x81',
env: {
NODE_REPL_HISTORY: '',
},
env,
});
t.regex(buf, /Error: unexpected end of input/);
});
Expand Down
4 changes: 2 additions & 2 deletions packages/cbor-rn-prereqs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cbor-rn-prereqs",
"version": "10.0.3",
"version": "10.0.4",
"description": "React Native pre-requisites for cbor",
"main": "index.js",
"scripts": {
Expand All @@ -20,7 +20,7 @@
"author": "Joe Hildebrand <joe-github@cursive.net>",
"license": "MIT",
"dependencies": {
"@cto.af/textdecoder": "^0.2.0",
"@cto.af/textdecoder": "^0.2.1",
"big-integer": "^1.6.52",
"buffer": "^6.0.3",
"events": "^3.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/cbor-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cbor-web",
"version": "10.0.3",
"version": "10.0.4",
"description": "",
"main": "dist/cbor.js",
"types": "./types/lib/cbor.d.ts",
Expand Down Expand Up @@ -32,7 +32,7 @@
"stream-browserify": "^3.0.0",
"string_decoder": "^1.3.0",
"util-deprecate": "^1.0.2",
"webpack": "^5.99.7",
"webpack": "^5.99.9",
"webpack-cli": "^5.1.4"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/cbor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cbor",
"version": "10.0.3",
"version": "10.0.4",
"description": "Encode and parse data in the Concise Binary Object Representation (CBOR) data format (RFC8949).",
"main": "./lib/cbor.js",
"repository": {
Expand Down Expand Up @@ -51,7 +51,7 @@
"nofilter": "^3.0.2"
},
"devDependencies": {
"@types/node": "^22",
"@types/node": "^24",
"bignumber.js": "^9.3.0",
"garbage": "~0.0.0",
"p-event": "^4.2.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/parcel-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parcel-demo",
"version": "10.0.3",
"version": "10.0.4",
"description": "",
"private": true,
"type": "module",
Expand All @@ -19,18 +19,18 @@
"directory": "packages/parcel-demo"
},
"devDependencies": {
"@parcel/core": "2.14.4",
"@parcel/optimizer-data-url": "2.14.4",
"@parcel/transformer-inline-string": "2.14.4",
"@parcel/core": "2.15.4",
"@parcel/optimizer-data-url": "2.15.4",
"@parcel/transformer-inline-string": "2.15.4",
"bignumber.js": "9.3.0",
"buffer": "6.0.3",
"cbor": "^10.0.3",
"cbor-bigdecimal": "^10.0.3",
"copyfiles": "^2.4.1",
"events": "3.3.0",
"node-inspect-extracted": "^3.0.2",
"parcel": "2.14.4",
"postcss": "^8.5.3",
"node-inspect-extracted": "^3.1.0",
"parcel": "2.15.4",
"postcss": "^8.5.6",
"process": "0.11.10",
"regenerator-runtime": "^0.14.1",
"rimraf": "5.0.10",
Expand Down
4 changes: 2 additions & 2 deletions packages/plain-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plain-demo",
"version": "10.0.3",
"version": "10.0.4",
"description": "A demo for cbor-web with no bundler",
"private": true,
"scripts": {
Expand All @@ -21,7 +21,7 @@
"cbor-bigdecimal": "^10.0.3",
"cbor-web": "^10.0.3",
"copyfiles": "^2.4.1",
"node-inspect-extracted": "^3.0.2"
"node-inspect-extracted": "^3.1.0"
},
"engines": {
"node": ">=20"
Expand Down
4 changes: 2 additions & 2 deletions packages/puppeteer-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppeteer-demo",
"version": "10.0.3",
"version": "10.0.4",
"description": "Run all web demos in puppeteer",
"main": "index.js",
"private": true,
Expand All @@ -12,7 +12,7 @@
"license": "MIT",
"devDependencies": {
"chrome-finder": "^1.0.7",
"puppeteer": "^24.7.2"
"puppeteer": "^24.10.2"
},
"engines": {
"node": ">=20"
Expand Down
Loading