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

Deps #733

Merged
merged 4 commits into from
Apr 29, 2024
Merged

Deps #733

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
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
# Go
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -40,7 +40,7 @@ jobs:
ruby-version: '3.2'

- name: Set up Deno
uses: denolib/setup-deno@v2
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
# Go
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down Expand Up @@ -60,7 +60,14 @@ 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 All @@ -87,10 +94,10 @@ jobs:
# Go
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

---

## [6.0.5] 2024-04-29

### Changed

- Updated dependencies
- Updated `package.json` `engines.node` property to reflect changes from v6

---

## [6.0.4] 2024-03-27

### Fixed
Expand Down
12 changes: 12 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const arc = require('@architect/eslint-config')

module.exports = [
...arc,
{
ignores: [
'**/*-vendor.js',
'scratch/',
'test/mock',
],
},
]
28 changes: 13 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "src/index.js",
"scripts": {
"test": "npm run lint && npm run test:integration && npm run coverage",
"test:nolint": "npm run test:integration && npm run coverage",
"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",
Expand All @@ -13,7 +14,7 @@
"build": "node scripts/vendor.js && node bin/binary-config.js && npx pkg bin"
},
"engines": {
"node": ">=14"
"node": ">=16"
},
"repository": {
"type": "git",
Expand All @@ -28,20 +29,20 @@
"src/*"
],
"dependencies": {
"@architect/asap": "~7.0.8",
"@architect/create": "~5.0.2",
"@architect/hydrate": "~4.0.3",
"@architect/inventory": "~4.0.4",
"@architect/utils": "~4.0.4",
"@aws-lite/client": "^0.20.0",
"@architect/asap": "~7.0.10",
"@architect/create": "~5.0.3",
"@architect/hydrate": "~4.0.6",
"@architect/inventory": "~4.0.5",
"@architect/utils": "~4.0.6",
"@aws-lite/client": "^0.21.1",
"@aws-lite/dynamodb": "^0.3.4",
"@begin/hashid": "~1.0.0",
"chalk": "4.1.2",
"chokidar": "~3.6.0",
"depstatus": "~1.1.1",
"dynalite": "~3.2.2",
"finalhandler": "~1.2.0",
"glob": "~10.3.10",
"glob": "~10.3.12",
"http-proxy": "~1.18.1",
"lambda-runtimes": "~2.0.2",
"minimist": "~1.2.8",
Expand All @@ -53,25 +54,22 @@
"tmp": "~0.2.3",
"tree-kill": "~1.2.2",
"update-notifier-cjs": "~5.1.6",
"ws": "~8.16.0"
"ws": "~8.17.0"
},
"devDependencies": {
"@architect/eslint-config": "~3.0.0-RC.0",
"@architect/functions": "~8.1.0",
"@architect/eslint-config": "~3.0.0",
"@architect/functions": "~8.1.1",
"@architect/req-res-fixtures": "git+https://github.com/architect/req-res-fixtures.git",
"@aws-lite/apigatewaymanagementapi": "~0.0.8",
"@aws-lite/ssm": "~0.2.3",
"cross-env": "~7.0.3",
"eslint": "~8.57.0",
"eslint": "~9.1.1",
"fs-extra": "~11.2.0",
"nyc": "~15.1.0",
"pkg": "~5.8.1",
"proxyquire": "~2.1.3",
"tap-arc": "~1.2.2",
"tape": "~5.7.5",
"tiny-json-http": "~7.5.1"
},
"eslintConfig": {
"extends": "@architect/eslint-config"
}
}
2 changes: 0 additions & 2 deletions src/cli/_watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module.exports = function runWatcher (args, params) {

// Live reload starts within Sandbox, so we can only load it within the watcher
let livereload
// eslint-disable-next-line
livereload = require('../arc').livereload

try {
Expand Down Expand Up @@ -47,7 +46,6 @@ module.exports = function runWatcher (args, params) {
let end = Date.now()
update.done(`Sandbox reloaded in ${end - start}ms`)
// Rewrite the livereload WS server, or connected clients will be orphaned
// eslint-disable-next-line
livereload = require('../arc').livereload
}
})
Expand Down
2 changes: 1 addition & 1 deletion src/events/_listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = function eventBusListener (params, req, res) {
try {
message = JSON.parse(body)
}
catch (e) {
catch {
res.statusCode = 400
res.end('Sandbox @event bus exception parsing request body')
return
Expand Down
2 changes: 1 addition & 1 deletion src/http/register-websocket/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = function connection (params, connectionId, ws) {
let payload = JSON.parse(msg)
lambda = payload.action && get.ws(payload.action)
}
catch (e) {
catch {
// fallback to default
}
if (lambda) {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function start (params, callback) {
if (err) {
running._startupFailed = true
try { end(() => rej(err)) }
catch (e) { rej(err) }
catch { rej(err) }
}
else res(result)
}
Expand Down
4 changes: 0 additions & 4 deletions src/invoke-lambda/exec/runtimes/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ function client (method, params) {
try {
let { projectSrc, handlerFile, handlerMethod, shared, views } = JSON.parse(__ARC_CONFIG__);
let context = JSON.parse(__ARC_CONTEXT__);
/* eslint-disable-next-line */
let { join, sep } = require('path');
/* eslint-disable-next-line */
let { existsSync: exists, readFileSync: read } = require('fs');
let cwd = process.cwd();
delete process.env.__ARC_CONFIG__;
Expand All @@ -65,7 +63,6 @@ function client (method, params) {

async function run () {
/* Require first to populate the require cache for missing dependency warnings */
/* eslint-disable-next-line */
let handler = require(handlerFile)[handlerMethod];

/* Enumerate package files */
Expand Down Expand Up @@ -183,7 +180,6 @@ function client (method, params) {
await run();
}
catch (err) {
/* eslint-disable-next-line */
(async function initError () {
let unknown = 'Unknown init error';
console.log('Lambda init error:', err.body || err.message || unknown);
Expand Down
3 changes: 1 addition & 2 deletions src/sandbox/seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ module.exports = function startupSeedData (params, callback) {
let data
try {
if (ext === 'json') data = JSON.parse(readFileSync(file))
// eslint-disable-next-line
else data = require(file)
}
catch (err) {
catch {
return callback(Error(`Failed to load seed data from ${file}`))
}

Expand Down
1 change: 0 additions & 1 deletion src/tables/_get-db-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module.exports = function initDynamoClient ({ creds, inventory, ports }, callbac
let plugins = [
// Binary dist mode
process.pkg
// eslint-disable-next-line
? require(join(__dirname, '_aws-lite-dynamodb-vendor.js'))
: import('@aws-lite/dynamodb'),
]
Expand Down
1 change: 0 additions & 1 deletion test/integration/events-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function verifyPublish ({ t, pragma, event, file, message }) {
test('Set up env', t => {
t.plan(2)
setup(t)
// eslint-disable-next-line
arc = require('@architect/functions')
t.ok(sandbox, 'Got Sandbox')
})
Expand Down
1 change: 0 additions & 1 deletion test/integration/lambda-termination-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function check (t, altTimeout) {
test('Set up env', t => {
t.plan(2)
setup(t)
// eslint-disable-next-line
arc = require('@architect/functions')
t.ok(sandbox, 'Sandbox is present')
})
Expand Down
Loading