Skip to content

Commit

Permalink
Update deps, tests, and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanblock committed Feb 2, 2024
1 parent bf80d9c commit a5e5eb0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 21 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Breaking change: `arm64` is now the default Lambda architecture
- Breaking change: `nodejs20.x` and `python3.12` are now the default Node.js and Python Lambda runtimes, respectively
- Breaking change: removed support for Node.js 14.x (now EOL, and no longer available to created in AWS Lambda)
- AWS Lambda no longer supports Go-specific runtimes; as such, `go` and `golang` runtime aliases are no longer available
- Added Node.js 20.x to test matrix

---
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
},
"license": "Apache-2.0",
"dependencies": {
"@architect/asap": "~7.0.0-RC.2",
"@architect/asap": "~7.0.0",
"@architect/parser": "~6.0.3",
"@architect/utils": "~4.0.0-RC.4",
"@aws-lite/client": "^0.15.1",
"@architect/utils": "~4.0.0",
"@aws-lite/client": "^0.15.2",
"@aws-lite/ssm": "^0.2.2",
"lambda-runtimes": "~2.0.0"
"lambda-runtimes": "~2.0.1"
},
"devDependencies": {
"@architect/eslint-config": "~2.1.2",
Expand Down
25 changes: 8 additions & 17 deletions test/unit/src/config/pragmas/populate-lambda/get-runtimes-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test('Set up env', t => {
})

test('Friendly runtime names (aka aliases)', t => {
t.plan(14)
t.plan(12)
let config

config = getRuntimes({ config: c('Node.js'), inventory })
Expand All @@ -30,12 +30,8 @@ test('Friendly runtime names (aka aliases)', t => {
t.match(config.runtime, /java\d/, `Alias mapped to valid AWS Java string: ${config.runtime}`)
t.equal(config.runtimeAlias, 'java', `Alias returned lowcase as runtimeAlias: ${config.runtimeAlias}`)

config = getRuntimes({ config: c('golang'), inventory })
t.match(config.runtime, /go\d\.x/, `Alias mapped to valid AWS Go string: ${config.runtime}`)
t.equal(config.runtimeAlias, 'golang', `Alias returned lowcase as runtimeAlias: ${config.runtimeAlias}`)

config = getRuntimes({ config: c('.net'), inventory })
t.match(config.runtime, /dotnet6/, `Alias mapped to valid AWS .NET string: ${config.runtime}`)
t.match(config.runtime, /dotnet7/, `Alias mapped to valid AWS .NET string: ${config.runtime}`)
t.equal(config.runtimeAlias, '.net', `Alias returned lowcase as runtimeAlias: ${config.runtimeAlias}`)

config = getRuntimes({ config: c('custom'), inventory })
Expand All @@ -44,36 +40,31 @@ test('Friendly runtime names (aka aliases)', t => {
})

test('Exact runtime names', t => {
t.plan(16)
t.plan(14)
let name
let config

name = 'nodejs14.x'
config = getRuntimes({ config: c(name), inventory })
t.equal(config.runtime, name, `Returned correct runtime string: ${name}`)
t.notOk(config.runtimeAlias, 'Did not get runtimeAlias')

name = 'python3.9'
name = 'nodejs18.x'
config = getRuntimes({ config: c(name), inventory })
t.equal(config.runtime, name, `Returned correct runtime string: ${name}`)
t.notOk(config.runtimeAlias, 'Did not get runtimeAlias')

name = 'ruby2.7'
name = 'python3.11'
config = getRuntimes({ config: c(name), inventory })
t.equal(config.runtime, name, `Returned correct runtime string: ${name}`)
t.notOk(config.runtimeAlias, 'Did not get runtimeAlias')

name = 'java11'
name = 'ruby3.2'
config = getRuntimes({ config: c(name), inventory })
t.equal(config.runtime, name, `Returned correct runtime string: ${name}`)
t.notOk(config.runtimeAlias, 'Did not get runtimeAlias')

name = 'go1.x'
name = 'java17'
config = getRuntimes({ config: c(name), inventory })
t.equal(config.runtime, name, `Returned correct runtime string: ${name}`)
t.notOk(config.runtimeAlias, 'Did not get runtimeAlias')

name = 'dotnetcore3.1'
name = 'dotnet6'
config = getRuntimes({ config: c(name), inventory })
t.equal(config.runtime, name, `Returned correct runtime string: ${name}`)
t.notOk(config.runtimeAlias, 'Did not get runtimeAlias')
Expand Down

0 comments on commit a5e5eb0

Please sign in to comment.