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

chore: change CI target for next #106

Merged
merged 3 commits into from
Jan 16, 2024
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
5 changes: 2 additions & 3 deletions .github/workflows/ci-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ on:
push:
branches:
- master
- next
pull_request:
workflow_dispatch:

jobs:
test:
uses: hapijs/.github/.github/workflows/ci-module.yml@master
with:
min-node-version: 14
uses: hapijs/.github/.github/workflows/ci-module.yml@min-node-18-hapi-21
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@
]
},
"dependencies": {
"@hapi/hoek": "^11.0.2",
"@hapi/b64": "^6.0.1",
"@hapi/boom": "^10.0.1",
"@hapi/bourne": "^3.0.0",
"@hapi/cryptiles": "^6.0.1"
"@hapi/cryptiles": "^6.0.1",
"@hapi/hoek": "^11.0.4"
},
"devDependencies": {
"@hapi/code": "^9.0.3",
"@hapi/eslint-plugin": "*",
"@hapi/lab": "^25.1.2",
"@types/node": "^17.0.31",
"@hapi/lab": "^25.2.0",
"@hapi/somever": "^4.1.1",
"@types/node": "^18.19.7",
"typescript": "~4.6.4"
},
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const B64 = require('@hapi/b64');
const Code = require('@hapi/code');
const Cryptiles = require('@hapi/cryptiles');
const Hoek = require('@hapi/hoek');
const Somever = require('@hapi/somever');
const Iron = require('..');
const Lab = require('@hapi/lab');

Expand Down Expand Up @@ -352,7 +353,11 @@ describe('Iron', () => {
const macBaseString = Iron.macPrefix + '**' + key.salt + '*' + iv + '*' + encryptedB64 + '*';
const mac = await Iron.hmacWithPassword(password, Iron.defaults.integrity, macBaseString);
const ticket = macBaseString + '*' + mac.salt + '*' + mac.digest;
const err = await expect(Iron.unseal(ticket, password, Iron.defaults)).to.reject(/Failed parsing sealed object JSON: Unexpected token a/);
const err = await expect(Iron.unseal(ticket, password, Iron.defaults)).to.reject(
Somever.match(process.version, '>=20') ?
/Failed parsing sealed object JSON: Expected property name or '}' in JSON at position 1/ :
/Failed parsing sealed object JSON: Unexpected token a/
);
expect(err.isBoom).to.be.true();
});

Expand Down