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

Release/5.0 #1134

Merged
merged 137 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
886935d
fix(appconfig): #1009 rewrite to not use deprecated appconfig getConf…
mju-spyrosoft Mar 13, 2023
c2ac7e8
fix(appconfig): #1009 add internal cache for previous configuration
mju-spyrosoft Mar 13, 2023
09e2419
test(appconfig): #1009 update skipped tests
mju-spyrosoft Mar 13, 2023
2dab467
test(appconfig): #1009 add todos for missing tests cases
mju-spyrosoft Mar 13, 2023
e2c4c0a
Merge branch 'feature/appconfig' into fix/appconfig-throws-error-when…
willfarrell Mar 14, 2023
3f02a80
fix(appconfig): #1009 update types and type tests
mju-spyrosoft Mar 15, 2023
2cab2ff
fix(appconfig): #1009 uninstall @aws-sdk/client-appconfig
mju-spyrosoft Mar 15, 2023
5a1c2af
fix(appconfig): #1009 npm install
mju-spyrosoft Mar 15, 2023
9f898a4
fix(appconfig): #1009 add missing tests cases
mju-spyrosoft Mar 16, 2023
77ac83c
fix(appconfig): #1009 fix bug when configuration is returned as empty…
mju-spyrosoft Mar 16, 2023
27ec63d
chore(appconfig): #1009 lint d.ts files
mju-spyrosoft Mar 17, 2023
b637934
test(appconfig): add test for fetching multiple parameters
mju-spyrosoft Mar 20, 2023
f414b64
Merge branch 'feature/appconfig' into fix/appconfig-throws-error-when…
willfarrell Mar 25, 2023
58acca6
Merge pull request #1029 from mju-spyrosoft/fix/appconfig-throws-erro…
willfarrell Mar 25, 2023
f8fcdda
ci: fix lock file
willfarrell Mar 25, 2023
08c35e3
chore: bump node version
willfarrell Mar 25, 2023
8633ff6
ci: bump es version
willfarrell Mar 25, 2023
3c1df2b
feat: update all errors to be in consistent format
willfarrell Mar 25, 2023
1c86a6a
feat: update default options
willfarrell Mar 25, 2023
88c8b06
Merge branch 'main' into release/5.0
willfarrell Mar 25, 2023
d1b69b8
docs: add in iam
willfarrell Mar 25, 2023
aff55c8
Merge branch 'main' into release/5.0
willfarrell Mar 26, 2023
d34b7ec
docs: update required dep
willfarrell Mar 26, 2023
3ee08db
docs: add breaking change steps
willfarrell Mar 26, 2023
b2d8f20
feat: refactor to use fetch
willfarrell Mar 26, 2023
a8a91d3
chore: remove console
willfarrell Mar 26, 2023
bb2319c
fix: use structuredClone
willfarrell Mar 26, 2023
9d92432
Merge branch 'main' into release/5.0
willfarrell Apr 10, 2023
334e5a0
ci: fix test or error.cause
willfarrell Apr 10, 2023
6dafaef
fix: update to match ttp-content-negotiation
willfarrell Apr 10, 2023
fa02bec
Merge branch 'main' into release/5.0
willfarrell Apr 13, 2023
ac495f4
Merge branch '4.x' into release/5.0
willfarrell Apr 17, 2023
fce9e4f
Merge branch 'main' into release/5.0
willfarrell Apr 22, 2023
6f83c8f
fix: prefer no preflight response
willfarrell Apr 22, 2023
3bd8ecc
docs: fix middleware image
willfarrell Apr 27, 2023
122aa7d
Merge branch 'main' into release/5.0
willfarrell May 15, 2023
f8af3d6
fix: small perf improvement
willfarrell May 15, 2023
97743e3
Merge branch 'main' into release/5.0
willfarrell May 15, 2023
0759cc7
chore: dep update
willfarrell May 15, 2023
3626141
ci: dep update
willfarrell May 15, 2023
a1d6654
ci: bump node version
willfarrell May 15, 2023
b36df23
feat: allow access to context/event
willfarrell May 17, 2023
fd0c36d
feat: update to match middleware changes
willfarrell May 17, 2023
14e94db
docs: grammer
willfarrell May 17, 2023
0c55248
Merge branch 'main' into release/5.0
willfarrell May 18, 2023
d7a7db8
Merge branch 'main' into release/5.0
willfarrell Jun 9, 2023
a955b9b
Merge branch 'main' into release/5.0
willfarrell Jul 21, 2023
84c1f80
chore: dep update
willfarrell Jul 21, 2023
84ccf59
Merge branch '4.x' into release/5.0
willfarrell Aug 10, 2023
548ef2f
docs: add award
willfarrell Aug 22, 2023
ddd6619
Green CI for 5.0 (#1090)
lmammino Aug 25, 2023
5e78b0b
chore: dep update
willfarrell Aug 25, 2023
335f3d3
fix: appconfig unit tests
willfarrell Aug 25, 2023
8eafd4e
chore: dep update
willfarrell Aug 25, 2023
9a56a94
feat: type for Internal storage with partial ssm support
m-radzikowski Aug 26, 2023
68be775
chore: fix formatting
m-radzikowski Aug 27, 2023
510202c
Merge branch 'main' into release/5.0
willfarrell Sep 1, 2023
a0785be
feat: add in onError
willfarrell Sep 1, 2023
47f4f92
chore: dep update
willfarrell Sep 1, 2023
31caf32
Merge branch 'main' into release/5.0
willfarrell Sep 1, 2023
533162e
feat: type definition improvements for getInternal
lmammino Sep 8, 2023
4397f79
chore: made ts-lint happy
lmammino Sep 8, 2023
4d4ec6e
chore: added comment about the current state of `getInternal` type
lmammino Sep 8, 2023
35137d8
chore: ts-lint --fix the whole world, please
lmammino Sep 8, 2023
331f342
chore: updated SSM types and tests to make sure internal context is p…
lmammino Sep 8, 2023
f7e04d1
chore: type changes
lmammino Sep 8, 2023
d0966c6
feat(json-body-parser): allow specifying versioned events
naorpeled Sep 9, 2023
bcf035c
chore: cleanup
naorpeled Sep 9, 2023
653c035
chore: organize imports
naorpeled Sep 9, 2023
6abc083
chore: applied @wtfzambo suggestions
lmammino Sep 15, 2023
a76918a
feat: getInternal type supports resolving promises and property paths…
lmammino Sep 16, 2023
6f06dd4
chore: resolve conflict with packages/util/package-lock.json
lmammino Sep 16, 2023
50d42a0
feat: fixes issues with the SSM middleware removing type-fest and lim…
lmammino Sep 16, 2023
35ba1df
chore: ts-lint
lmammino Sep 16, 2023
70428f5
chore: replaces some never with unknown as suggested by @jfet97
lmammino Sep 17, 2023
b9430a5
Merge branch 'main' into release/5.0
willfarrell Sep 17, 2023
7364d6a
feat: make ajv-cmd optional
willfarrell Sep 17, 2023
2342b52
Merge pull request #1100 from naorpeled/feat/json-body-parser/support…
willfarrell Sep 17, 2023
2c2d858
Merge branch 'main' into release/5.0
willfarrell Sep 17, 2023
6eba6db
chore: resolve conflict with 5.0 branch
lmammino Sep 22, 2023
dc7b448
chore: resolve conflict with 5.0 branch, again
lmammino Sep 22, 2023
b3d1192
feat: added improved types for AppConfig middleware
lmammino Sep 22, 2023
705438d
Merge branch 'release/5.0' into internal-typing
lmammino Sep 22, 2023
49c8f22
chore: re-aligned appconfig with v5 branch
lmammino Sep 22, 2023
0b551d8
ci: drop cjs support
willfarrell Sep 25, 2023
1076c83
fix(http-json-body-parser): tests in Node 20
lmammino Sep 29, 2023
abd56f6
fix(ws-json-body-parser): tests in Node 20
lmammino Sep 29, 2023
05cd8ec
feat(dynamodb): improved typing
lmammino Sep 29, 2023
a2ab8d7
feat(s3): improved types
lmammino Sep 29, 2023
4716ef7
feat(s3): improved types
lmammino Sep 29, 2023
1ce5bdd
feat: updated types for rds-signer
lmammino Oct 6, 2023
6d376fd
feat: updated types for rds-signer
lmammino Oct 6, 2023
be5ccbf
feat(s3-object-response): improved type definitions and tests
lmammino Oct 7, 2023
b5d2415
feat(secrets-manager): improved type definitions and tests
lmammino Oct 7, 2023
4f5a619
feat(service-discovery): improved type definitions and tests
lmammino Oct 8, 2023
3c4c524
feat(sts): improved type definitions and tests
lmammino Oct 8, 2023
a673016
feat(rds-signer): removed unnecessary `database` property
lmammino Oct 8, 2023
43ec341
Merge branch 'main' into release/5.0
willfarrell Oct 8, 2023
776b2f0
Merge pull request #1093 from m-radzikowski/internal-typing
willfarrell Oct 8, 2023
24399d6
chore: dep update
willfarrell Oct 8, 2023
ebce8d5
chore: version bump
willfarrell Oct 8, 2023
2df9561
chore: version bump
willfarrell Oct 8, 2023
ad54041
fix: clean up database ref
willfarrell Oct 8, 2023
f28e53d
docs: update relase date
willfarrell Oct 8, 2023
a477a1b
Revert "chore: version bump"
willfarrell Oct 8, 2023
0a70604
chore: version bump
willfarrell Oct 8, 2023
504c482
fix(http-error-handler): non http errors will be handled as 'Internal…
qoomon Oct 27, 2023
e6c3889
docs: flag breaking change
willfarrell Nov 8, 2023
153d764
Merge branch 'main' into release/5.0
willfarrell Nov 8, 2023
ded7a13
chore: dep update
willfarrell Nov 8, 2023
4c99241
fix: extra )
willfarrell Nov 8, 2023
b843f9d
Merge pull request #1117 from qoomon/patch-1
willfarrell Nov 8, 2023
9b3e5dd
test: update to be cleaner and easier to use
willfarrell Nov 8, 2023
ef7656a
Merge branch 'main' into release/5.0
willfarrell Nov 8, 2023
b472ea4
docs: ensure all example use the same pattern
willfarrell Nov 8, 2023
60bbf17
feat(website): updated docusaurus v3 and minor style improvements
lmammino Nov 11, 2023
a98b28d
feat(website): update use with typescript
lmammino Nov 11, 2023
5644e76
Merge pull request #1130 from middyjs/feat-improve-ts-docs
willfarrell Nov 11, 2023
583a3b0
Merge pull request #1129 from middyjs/update-website-to-docusaurus3
willfarrell Nov 11, 2023
21828af
fix(middlewares/http-json-body-parser): narrow body type to string
naorpeled Nov 11, 2023
53c0166
fix(style): lint
naorpeled Nov 11, 2023
a996c81
Merge branch 'release/5.0' into fix/http-json-body-parser/resolve-typ…
naorpeled Nov 11, 2023
7effb08
Merge branch 'main' into release/5.0
willfarrell Nov 11, 2023
d1dd479
chore: rebase
naorpeled Nov 11, 2023
612d897
chore: rebase
naorpeled Nov 11, 2023
721ef58
chore: rebase
naorpeled Nov 11, 2023
1c4f5a2
chore: rebase
naorpeled Nov 11, 2023
2136d53
Merge pull request #1131 from naorpeled/fix/http-json-body-parser/res…
willfarrell Nov 11, 2023
a78c183
docs: update issue template
willfarrell Nov 11, 2023
a8fc81a
chore: clean up
willfarrell Nov 11, 2023
403c54b
chore: dep update
willfarrell Nov 11, 2023
581621f
chore: version bump
willfarrell Nov 11, 2023
483bb3f
docs: add in aka
willfarrell Nov 11, 2023
aaf136d
fix: don't throw error for non http event
robertbeal Nov 15, 2023
e14c932
Merge pull request #1133 from robertbeal/http-event-normalizer-errors…
willfarrell Nov 15, 2023
3fd1388
docs: add in change details
willfarrell Nov 15, 2023
3e7e1c9
chore: version bump
willfarrell Nov 15, 2023
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: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
How to reproduce the behaviour:

1. Sample code '...'
2. Input '....'
3. Unit test '....'
Expand All @@ -21,9 +21,10 @@ How to reproduce the behaviour:
A clear and concise description of what you expected to happen.

**Environment (please complete the following information):**
- Node.js: [e.g. 16]
- Middy: [e.g. 3.0.0]
- AWS SDK [e.g. 2.1000.0]

- Node.js: [e.g. 20]
- Middy: [e.g. 5.0.0]
- AWS SDK [e.g. 3.0.0]

**Additional context**
Add any other context about the problem here.
1 change: 0 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
strategy:
matrix:
node-version: [18.x]
#node-version: [ 14.x, 16.x ]

steps:
- name: Checkout repository
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

permissions:
contents: read
Expand All @@ -34,16 +34,19 @@ jobs:
run: |
npm install

- name: Transpile for Node.js ${{ matrix.node-version }}
- name: Transpile for Node.js ${{ matrix.node-version }} (esm)
run: |
./node_modules/.bin/lerna exec --bail --concurrency 2 -- ../../node_modules/.bin/swc --config-file ../../swc.cjs.config.json --source-maps false index.js --out-file index.cjs
./node_modules/.bin/lerna exec --bail --concurrency 2 -- sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' index.cjs # Fix CommonJS default import
sed -i.bak 's/awsembeddedmetrics.default.createMetricsLogger/awsembeddedmetrics.createMetricsLogger/g' packages/cloudwatch-metrics/index.cjs # Fix CommonJS default import
./node_modules/.bin/lerna exec --bail --concurrency 2 -- ../../node_modules/.bin/swc --config-file ../../swc.esm.config.json --source-maps false index.js --out-file index.js

./node_modules/.bin/swc --config-file ./swc.cjs.config.json --source-maps false packages/validator/transpile.js --out-file packages/validator/transpile.cjs
sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' packages/validator/transpile.cjs # Fix CommonJS default import
./node_modules/.bin/swc --config-file ./swc.esm.config.json --source-maps false packages/validator/transpile.js --out-file packages/validator/transpile.js
#- name: Transpile for Node.js ${{ matrix.node-version }} (cjs)
# run: |
# ./node_modules/.bin/lerna exec --bail --concurrency 2 -- ../../node_modules/.bin/swc --config-file ../../swc.cjs.config.json --source-maps false index.js --out-file index.cjs
# ./node_modules/.bin/lerna exec --bail --concurrency 2 -- sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' index.cjs # Fix CommonJS default import
# sed -i.bak 's/awsEmbeddedMetrics.default.createMetricsLogger/awsEmbeddedMetrics.createMetricsLogger/g' packages/cloudwatch-metrics/index.cjs # Fix CommonJS default import

# ./node_modules/.bin/swc --config-file ./swc.cjs.config.json --source-maps false packages/validator/transpile.js --out-file packages/validator/transpile.cjs
# sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' packages/validator/transpile.cjs # Fix CommonJS default import

#- name: Pre-Release
# if: contains(${{GITHUB_REF}}, 'alpha') || contains(${{GITHUB_REF}}, 'beta') || contains(${{GITHUB_REF}}, 'rc')
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [18.x, 20.x]

steps:
- name: Checkout repository
Expand All @@ -28,22 +28,25 @@ jobs:
run: |
npm install

- name: Transpile for Node.js ${{ matrix.node-version }}
- name: Transpile for Node.js ${{ matrix.node-version }} (esm)
run: |
./node_modules/.bin/lerna exec --bail --concurrency 2 -- ../../node_modules/.bin/swc --config-file ../../swc.cjs.config.json --source-maps false index.js --out-file index.cjs
./node_modules/.bin/lerna exec --bail --concurrency 2 -- sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' index.cjs # Fix CommonJS default import
sed -i.bak 's/awsEmbeddedMetrics.default.createMetricsLogger/awsEmbeddedMetrics.createMetricsLogger/g' packages/cloudwatch-metrics/index.cjs # Fix CommonJS default import
./node_modules/.bin/lerna exec --bail --concurrency 2 -- ../../node_modules/.bin/swc --config-file ../../swc.esm.config.json --source-maps false index.js --out-file index.js

./node_modules/.bin/swc --config-file ./swc.cjs.config.json --source-maps false packages/validator/transpile.js --out-file packages/validator/transpile.cjs
sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' packages/validator/transpile.cjs # Fix CommonJS default import
./node_modules/.bin/swc --config-file ./swc.esm.config.json --source-maps false packages/validator/transpile.js --out-file packages/validator/transpile.js
#- name: Transpile for Node.js ${{ matrix.node-version }} (cjs)
# run: |
# ./node_modules/.bin/lerna exec --bail --concurrency 2 -- ../../node_modules/.bin/swc --config-file ../../swc.cjs.config.json --source-maps false index.js --out-file index.cjs
# ./node_modules/.bin/lerna exec --bail --concurrency 2 -- sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' index.cjs # Fix CommonJS default import
# sed -i.bak 's/awsEmbeddedMetrics.default.createMetricsLogger/awsEmbeddedMetrics.createMetricsLogger/g' packages/cloudwatch-metrics/index.cjs # Fix CommonJS default import

# ./node_modules/.bin/swc --config-file ./swc.cjs.config.json --source-maps false packages/validator/transpile.js --out-file packages/validator/transpile.cjs
# sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' packages/validator/transpile.cjs # Fix CommonJS default import
- name: Unit tests
run: |
npm run test:packages:unit

- name: Test cjs can be required
run: |
node -e 'const middy = require("./packages/core/index.cjs"); middy()'
node -e 'const httpRouterHandler = require("./packages/http-router/index.cjs"); httpRouterHandler([])'
node -e 'const {transpileSchema, transpileLocale} = require("./packages/validator/transpile.cjs"); transpileSchema({}); transpileLocale("")'
#- name: Test cjs can be required
# run: |
# node -e 'const middy = require("./packages/core/index.cjs"); middy()'
# node -e 'const httpRouterHandler = require("./packages/http-router/index.cjs"); httpRouterHandler([])'
# node -e 'const {transpileSchema, transpileLocale} = require("./packages/validator/transpile.cjs"); transpileSchema({}); transpileLocale("")'
7 changes: 6 additions & 1 deletion .github/workflows/website-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ jobs:
website:
name: Publish website
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18.x
node-version: ${{ matrix.node-version }}
- name: Install dependencies
working-directory: website
run: |
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"packages": ["packages/*"],
"version": "4.7.0"
"version": "5.0.0"
}
Loading
Loading