Skip to content
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
9 changes: 1 addition & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [ 16.x, 18.x, 20.x, 22.x ]
node-version: [ 20.x, 22.x, 24.x ]
os: [ windows-latest, ubuntu-latest, macOS-latest ]

# Go
Expand All @@ -40,14 +40,7 @@ jobs:
- name: Install
run: npm install

- name: Test (Node.js <= 16.x)
if: matrix.node-version <= '16.x'
run: npm run test:nolint
env:
CI: true

- name: Test
if: matrix.node-version > '16.x'
run: npm test
env:
CI: true
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ scratch/
test/mock/*/src/*/*/vendor/
test/mock/tmp/
yarn.lock
.kiro
38 changes: 18 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@architect/functions",
"version": "8.1.9",
"version": "8.1.10-RC.0",
"description": "Runtime utility library for Functional Web Apps (FWAs) built with Architect (https://arc.codes)",
"homepage": "https://github.com/architect/functions",
"repository": {
Expand All @@ -11,56 +11,54 @@
"main": "src/index",
"types": "types/index.d.ts",
"scripts": {
"test:one": "cross-env tape 'test/unit/src/http/csrf/*-test.js' | tap-arc",
"lint": "eslint --fix .",
"test": "npm run lint && npm run test:integration && npm run coverage && npm run test:types",
"test:nolint": "npm run test:integration && npm run coverage && npm run test:types",
"test:unit": "cross-env tape 'test/unit/**/*-test.js' | tap-arc",
"test:integration": "cross-env tape 'test/integration/**/*-test.js' | tap-arc",
"coverage": "nyc --reporter=lcov --reporter=text npm run test:unit",
"test:unit": "cross-env tape 'test/unit/**/*-test.js'",
"test:integration": "cross-env tape 'test/integration/**/*-test.js'",
"test:types": "tsd --files types/*.test-d.ts",
"coverage": "nyc --reporter=lcov --reporter=text npm run test:unit",
"rc": "npm version prerelease --preid RC"
},
"engines": {
"node": ">=16"
"node": ">=20"
},
"author": "Brian LeRoux <[email protected]>",
"license": "Apache-2.0",
"dependencies": {
"@aws-lite/apigatewaymanagementapi": "^0.0.10",
"@aws-lite/client": "^0.22.4",
"@aws-lite/client": "^0.23.2",
"@aws-lite/dynamodb": "^0.3.9",
"@aws-lite/sns": "^0.0.8",
"@aws-lite/sqs": "^0.2.4",
"@aws-lite/ssm": "^0.2.5",
"cookie": "^1.0.2",
"cookie-signature": "^1.2.2",
"csrf": "^3.1.0",
"node-webtokens": "^1.0.4",
"run-parallel": "^1.2.0",
"run-waterfall": "^1.1.7",
"uid-safe": "^2.1.5"
"cookie": "1.0.2",
"cookie-signature": "1.2.2",
"csrf": "3.1.0",
"node-webtokens": "1.0.4",
"run-parallel": "1.2.0",
"run-waterfall": "1.1.7",
"uid-safe": "2.1.5"
},
"devDependencies": {
"@architect/asap": "^7.0.10",
"@architect/eslint-config": "^3.0.0",
"@architect/req-res-fixtures": "git+https://github.com/architect/req-res-fixtures.git",
"@architect/sandbox": "^6.0.5",
"@architect/sandbox": "^8.0.0-RC.2",
"@aws-lite/apigatewaymanagementapi-types": "^0.0.13",
"@aws-lite/dynamodb-types": "^0.3.11",
"@aws-lite/sns-types": "^0.0.10",
"@aws-lite/sqs-types": "^0.2.6",
"@types/aws-lambda": "^8.10.147",
"@types/node": "18",
"cross-env": "~7.0.3",
"@types/node": "^24.5.2",
"cross-env": "^10.0.0",
"eslint": "^9.19.0",
"nyc": "~17.1.0",
"proxyquire": "~2.1.3",
"sinon": "^19.0.2",
"tap-arc": "^1.3.2",
"sinon": "^21.0.0",
"tape": "^5.9.0",
"tiny-json-http": "^7.5.1",
"tsd": "^0.31.2"
"tsd": "^0.33.0"
},
"files": [
"types/*",
Expand Down
4 changes: 2 additions & 2 deletions test/unit/src/http/csrf/create-and-verify-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ test('verify a value', t => {

test('tampered token is falsy', t => {
t.plan(1)
let tamperedToken = "3d879d515ab241429c97dfea6d1e1927.1584118407000.b0b34563d569030cbe9a4ea63312f23729813b838478420e3811c0bfeaf3add1"
let tamperedToken = '3d879d515ab241429c97dfea6d1e1927.1584118407000.b0b34563d569030cbe9a4ea63312f23729813b838478420e3811c0bfeaf3add1'
t.ok(http.csrf.verify(tamperedToken) === false, 'value falsy')
})

test('token expired is falsy', t => {
t.plan(1)
let expiredToken = "3d879d515ab241419c97dfea6d1e1927.1584118407000.b0b34563d569030cbe9a4ea63312f23729813b838478420e3811c0bfeaf3add1"
let expiredToken = '3d879d515ab241419c97dfea6d1e1927.1584118407000.b0b34563d569030cbe9a4ea63312f23729813b838478420e3811c0bfeaf3add1'
t.ok(http.csrf.verify(expiredToken) === false, 'value falsy')
})

Expand Down
Loading