Skip to content

Commit 3ee38e5

Browse files
Merge branch 'master' into defer-buffer
2 parents 303f810 + e248a96 commit 3ee38e5

File tree

69 files changed

+9723
-22672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+9723
-22672
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ module.exports = {
8080
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': false }],
8181
// This rule fights with Prettier and no-semi
8282
'@typescript-eslint/no-extra-semi': 'off',
83+
// Added in later versions of @typescript-eslint
84+
'@typescript-eslint/explicit-module-boundary-types': 'off',
85+
'@typescript-eslint/no-unused-vars': 'off',
8386
},
8487
// This is a good rule,
8588
// but in many tests,

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# This workflow performs tests in JavaScript.
2+
name: ESDK JavaScript CI Tests
3+
4+
on: [pull_request, workflow_call]
5+
6+
jobs:
7+
CI:
8+
strategy:
9+
matrix:
10+
node: [16, 18.x, 20.x, 22.x, latest]
11+
fail-fast: false
12+
runs-on: codebuild-AWS-ESDK-JS-Release-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-5.0-large
13+
permissions:
14+
id-token: write
15+
contents: read
16+
defaults:
17+
run:
18+
shell: bash
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
submodules: true
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{matrix.node}}
26+
- name: Configure AWS Credentials for Tests
27+
uses: aws-actions/configure-aws-credentials@v4
28+
with:
29+
aws-region: us-west-2
30+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-MPL-Dafny-Role-us-west-2
31+
role-session-name: JavaScriptTests
32+
- name: Test Coverage Node ${{matrix.node}}
33+
env:
34+
NODE_OPTIONS: "--max-old-space-size=4096"
35+
run: |
36+
npm ci
37+
npm run build
38+
npm run coverage-node
39+
- name: Test Coverage Browser ${{matrix.node}}
40+
env:
41+
NODE_OPTIONS: "--max-old-space-size=4096"
42+
run: |
43+
npm run coverage-browser
44+
- name: Test compliance
45+
env:
46+
NODE_OPTIONS: "--max-old-space-size=4096"
47+
run: |
48+
npm run lint
49+
npm run test_conditions
50+
- name: Run Test Vectors Node ${{matrix.node}}
51+
env:
52+
NODE_OPTIONS: "--max-old-space-size=4096"
53+
NPM_CONFIG_UNSAFE_PERM: true
54+
PUBLISH_LOCAL: true
55+
run: |
56+
npm run verdaccio-publish
57+
npm run verdaccio-node-decrypt
58+
npm run verdaccio-node-encrypt
59+
- name: Run Test Vectors Browser node ${{matrix.node}}
60+
env:
61+
NODE_OPTIONS: "--max-old-space-size=4096"
62+
NPM_CONFIG_UNSAFE_PERM: true
63+
PUBLISH_LOCAL: true
64+
run: |
65+
npm run verdaccio-publish
66+
npm run verdaccio-browser-decrypt
67+
npm run verdaccio-browser-encrypt

.github/workflows/daily_ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This workflow runs every weekday at 15:00 UTC (8AM PDT)
2+
name: Daily CI
3+
4+
on:
5+
schedule:
6+
- cron: "00 15 * * 1-5"
7+
8+
jobs:
9+
DAILY_CI:
10+
# Don't run the cron builds on forks
11+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
12+
uses: ./.github/workflows/ci.yml

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/awslabs/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
### Bug Fixes
9+
10+
- Add CVE-2023-46809 option to integration node ([#1424](https://github.com/awslabs/aws-encryption-sdk-javascript/issues/1424)) ([84a7034](https://github.com/awslabs/aws-encryption-sdk-javascript/commit/84a703440aa7313ad0c779e50b7c052aa8dd5e7b))
11+
- **CI:** npx_verdaccio ([#1190](https://github.com/awslabs/aws-encryption-sdk-javascript/issues/1190)) ([1051f19](https://github.com/awslabs/aws-encryption-sdk-javascript/commit/1051f19578ba54bc476a30dedf5779576cf46d9f))
12+
613
# [4.0.0](https://github.com/awslabs/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
714

815
- feat!: Remove AWS SDK V2 Dependency (#1180) ([1d74248](https://github.com/awslabs/aws-encryption-sdk-javascript/commit/1d742489b436748a656ecc2abce00e99353d1d62)), closes [#1180](https://github.com/awslabs/aws-encryption-sdk-javascript/issues/1180)

karma.conf.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ function createCredentialPreprocessor() {
127127
// This will affect the generated (ES5) JS
128128
const regionCode = `var defaultRegion = '${region}';`
129129
const credentialsCode = `var credentials = ${JSON.stringify(credentials)};`
130+
// See: https://github.com/aws/aws-sdk-js-v3/issues/5890
131+
const expirationNeedsToBeDate = `credentials.expiration = new Date(credentials.expiration);`
130132
const isBrowser = `var isBrowser = true;`
131133
const contents = content.split('\n')
132134
let idx = -1
@@ -137,7 +139,7 @@ function createCredentialPreprocessor() {
137139
break
138140
}
139141
}
140-
contents.splice(idx + 1, 0, regionCode, credentialsCode, isBrowser)
142+
contents.splice(idx + 1, 0, regionCode, credentialsCode, expirationNeedsToBeDate, isBrowser)
141143
done(contents.join('\n'))
142144
}
143145
}

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"packages": ["modules/*"],
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"command": {
55
"bootstrap": {
66
"nohoist": ["typedoc"]

modules/cache-material/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/cache-material
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/cache-material

modules/cache-material/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-crypto/cache-material",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"scripts": {
55
"prepublishOnly": "npm run build",
66
"build": "tsc -b tsconfig.json && tsc -b tsconfig.module.json",

modules/caching-materials-manager-browser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/caching-materials-manager-browser
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/caching-materials-manager-browser

modules/caching-materials-manager-browser/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-crypto/caching-materials-manager-browser",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"scripts": {
55
"prepublishOnly": "npm run build",
66
"build": "tsc -b tsconfig.json && tsc -b tsconfig.module.json",
@@ -22,7 +22,7 @@
2222
"@aws-crypto/material-management-browser": "file:../material-management-browser",
2323
"@aws-crypto/serialize": "file:../serialize",
2424
"@aws-crypto/web-crypto-backend": "file:../web-crypto-backend",
25-
"@aws-sdk/util-base64-browser": "3.209.0",
25+
"@aws-sdk/util-base64": "^3.374.0",
2626
"@aws-sdk/util-utf8-browser": "3.259.0",
2727
"tslib": "^2.2.0"
2828
},

modules/caching-materials-manager-node/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/caching-materials-manager-node
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/caching-materials-manager-node

modules/caching-materials-manager-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-crypto/caching-materials-manager-node",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"scripts": {
55
"prepublishOnly": "npm run build",
66
"build": "tsc -b tsconfig.json && tsc -b tsconfig.module.json",

modules/client-browser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/client-browser
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/client-browser

modules/client-browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"CSE",
1010
"aws"
1111
],
12-
"version": "4.0.0",
12+
"version": "4.0.1",
1313
"scripts": {
1414
"build": "tsc -b tsconfig.json",
1515
"lint": "run-s lint-*",

modules/client-node/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/client-node
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/client-node

modules/client-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"CSE",
1010
"aws"
1111
],
12-
"version": "4.0.0",
12+
"version": "4.0.1",
1313
"scripts": {
1414
"build": "tsc -b tsconfig.json",
1515
"lint": "run-s lint-*",

modules/decrypt-browser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/decrypt-browser
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/decrypt-browser

modules/decrypt-browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-crypto/decrypt-browser",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"scripts": {
55
"prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json",
66
"lint": "run-s lint-*",

modules/decrypt-node/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/decrypt-node
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/decrypt-node

modules/decrypt-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-crypto/decrypt-node",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"scripts": {
55
"prepublishOnly": "npm run build",
66
"build": "tsc -b tsconfig.json && tsc -b tsconfig.module.json",

modules/encrypt-browser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/encrypt-browser
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/encrypt-browser

modules/encrypt-browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-crypto/encrypt-browser",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"scripts": {
55
"prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json",
66
"lint": "run-s lint-*",

modules/encrypt-node/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/encrypt-node
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/encrypt-node

modules/encrypt-node/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-crypto/encrypt-node",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"scripts": {
55
"prepublishOnly": "tsc -p tsconfig.json && tsc -p tsconfig.module.json",
66
"lint": "run-s lint-*",
@@ -20,7 +20,7 @@
2020
"@aws-crypto/material-management-node": "file:../material-management-node",
2121
"@aws-crypto/serialize": "file:../serialize",
2222
"@types/duplexify": "^3.6.0",
23-
"duplexify": "^4.1.1",
23+
"duplexify": "^4.1.3",
2424
"readable-stream": "^3.6.0",
2525
"tslib": "^2.2.0"
2626
},

modules/example-browser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/example-browser
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/example-browser

modules/example-browser/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-crypto/example-browser",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"scripts": {
55
"prepublishOnly": "npm run build",
66
"build": "tsc -b tsconfig.json && tsc -b tsconfig.module.json",
@@ -26,7 +26,7 @@
2626
"license": "Apache-2.0",
2727
"dependencies": {
2828
"@aws-crypto/client-browser": "file:../client-browser",
29-
"@aws-sdk/util-base64-browser": "3.209.0",
29+
"@aws-sdk/util-base64": "^3.374.0",
3030
"@types/chai": "^4.2.11",
3131
"chai": "^4.2.0",
3232
"karma": "^6.3.17",

modules/example-node/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/example-node
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
**Note:** Version bump only for package @aws-crypto/example-node

modules/example-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-crypto/example-node",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"scripts": {
55
"prepublishOnly": "npm run build",
66
"build": "tsc -b tsconfig.json && tsc -b tsconfig.module.json",

modules/integration-browser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.0.1](https://github.com/aws/aws-encryption-sdk-javascript/compare/v4.0.0...v4.0.1) (2024-07-30)
7+
8+
**Note:** Version bump only for package @aws-crypto/integration-browser
9+
610
# [4.0.0](https://github.com/aws/aws-encryption-sdk-javascript/compare/v3.2.2...v4.0.0) (2023-07-17)
711

812
- feat!: Remove AWS SDK V2 Dependency (#1180) ([1d74248](https://github.com/aws/aws-encryption-sdk-javascript/commit/1d742489b436748a656ecc2abce00e99353d1d62)), closes [#1180](https://github.com/aws/aws-encryption-sdk-javascript/issues/1180)

0 commit comments

Comments
 (0)