Skip to content

Commit 266ee9f

Browse files
authored
chore: Warn 1.x is End-of-Support (#994)
1 parent 4fc85f3 commit 266ee9f

File tree

12 files changed

+163
-2
lines changed

12 files changed

+163
-2
lines changed

SUPPORT_POLICY.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Overview
2+
========
3+
This page describes the support policy for the AWS Encryption SDK. We regularly provide the AWS Encryption SDK with updates that may contain support for new or updated APIs, new features, enhancements, bug fixes, security patches, or documentation updates. Updates may also address changes with dependencies, language runtimes, and operating systems.
4+
5+
We recommend users to stay up-to-date with Encryption SDK releases to keep up with the latest features, security updates, and underlying dependencies. Continued use of an unsupported SDK version is not recommended and is done at the user’s discretion.
6+
7+
8+
Major Version Lifecycle
9+
========================
10+
The AWS Encryption SDK follows the same major version lifecycle as the AWS SDK. For details on this lifecycle, see `AWS SDKs and Tools Maintenance Policy`_.
11+
12+
Version Support Matrix
13+
======================
14+
This table describes the current support status of each major version of the AWS Encryption SDK for Javascript. It also shows the next status each major version will transition to, and the date at which that transition will happen.
15+
16+
.. list-table::
17+
:widths: 30 50 50 50
18+
:header-rows: 1
19+
20+
* - Major version
21+
- Current status
22+
- Next status
23+
- Next status date
24+
* - 1.x
25+
- End of Support
26+
-
27+
-
28+
* - 2.x
29+
- Maintenance
30+
- End of Support
31+
- 2023-03-02
32+
* - 3.x
33+
- General Availability
34+
-
35+
-
36+
37+
.. _AWS SDKs and Tools Maintenance Policy: https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle

buildspec.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@ batch:
55
build-list:
66
- identifier: nodejs10
77
buildspec: codebuild/nodejs10.yml
8+
env:
9+
compute-type: BUILD_GENERAL1_MEDIUM
810
- identifier: nodejs12
911
buildspec: codebuild/nodejs12.yml
12+
env:
13+
image: aws/codebuild/standard:5.0
14+
compute-type: BUILD_GENERAL1_MEDIUM

codebuild/nodejs10.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ phases:
1313
- npm run build
1414
build:
1515
commands:
16-
- npm test
16+
- npm run lint
17+
- npm run coverage-node
1718
- npm run test_conditions
1819
- npm run verdaccio

codebuild/release/prod-release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 0.2
2+
3+
batch:
4+
fast-fail: true
5+
build-graph:
6+
# CI
7+
- identifier: nodejs10
8+
buildspec: codebuild/nodejs10.yml
9+
env:
10+
compute-type: BUILD_GENERAL1_MEDIUM
11+
- identifier: nodejs12
12+
buildspec: codebuild/nodejs12.yml
13+
env:
14+
image: aws/codebuild/standard:5.0
15+
compute-type: BUILD_GENERAL1_MEDIUM
16+
17+
# Version the project and push git commits and tags
18+
- identifier: version
19+
depend-on:
20+
- nodejs10
21+
- nodejs12
22+
buildspec: codebuild/release/version.yml
23+
env:
24+
image: aws/codebuild/standard:5.0
25+
26+
# Publish the release to npm
27+
- identifier: publish
28+
depend-on:
29+
- version
30+
buildspec: codebuild/release/publish.yml
31+
env:
32+
image: aws/codebuild/standard:5.0

codebuild/release/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
NODE_OPTIONS: "--max-old-space-size=4096"
6+
BRANCH: "mainline-1.x"
7+
secrets-manager:
8+
OTP_SECRET_KEY: npm/aws-crypto-tools-ci-bot/2FA:OTP_SECRET_KEY
9+
NPM_TOKEN: npm/aws-crypto-tools-ci-bot/2FA:NPM_TOKEN
10+
11+
phases:
12+
install:
13+
commands:
14+
- npm ci --unsafe-perm
15+
# Install `otplib` to extract the OTP from the npm 2FA secret
16+
- npm install otplib --no-save
17+
- npm run build
18+
runtime-versions:
19+
nodejs: 12
20+
pre_build:
21+
commands:
22+
- git checkout $BRANCH
23+
build:
24+
commands:
25+
# Extract the otp using the secrets environment variables from above.
26+
# This will wait for the next token. This is because npm uses
27+
# TOTP and the tokens time out after 30 seconds. If the process just
28+
# extracted the token then the lifetime for this token
29+
# would be very random. This will maximize the amount of time
30+
# available on the OTP to publish.
31+
- >-
32+
OTP=`node -e "
33+
auth=require('otplib').authenticator;
34+
setTimeout(() =>
35+
console.log(auth.generate(process.env.OTP_SECRET_KEY)),
36+
auth.timeRemaining() * 1000);
37+
"`
38+
# npm will only expand env vars inside .npmrc
39+
# NOTE the ' this is to keep the env var NPM_TOKEN from expanding!
40+
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
41+
# Now we publish to npm.
42+
# This is going to use the OTP generated above and the NPM_TOKEN
43+
# environment variable. This will only publish things that are
44+
# missing from npm. It is therefore safe to run repeatedly.
45+
- npx lerna publish from-package --yes --otp $OTP
46+
# remove after publishing
47+
- rm .npmrc
48+

codebuild/release/version.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
NODE_OPTIONS: "--max-old-space-size=4096"
6+
BRANCH: "mainline-1.x"
7+
# An explicit version bump
8+
VERSION_BUMP: ""
9+
git-credential-helper: yes
10+
11+
phases:
12+
install:
13+
commands:
14+
- npm ci --unsafe-perm
15+
runtime-versions:
16+
nodejs: 12
17+
pre_build:
18+
commands:
19+
- git config --global user.name "aws-crypto-tools-ci-bot"
20+
- git config --global user.email "no-reply@noemail.local"
21+
- git checkout $BRANCH
22+
build:
23+
commands:
24+
# Generate new version and CHANGELOG entry and push it
25+
- npx lerna version --conventional-commits --git-remote origin --yes ${VERSION_BUMP:+$VERSION_BUMP --force-publish}
26+
# Log the commit for posterity
27+
- git log -n 1

modules/client-browser/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export * from '@aws-crypto/web-crypto-backend'
1313
import {
1414
CommitmentPolicy,
1515
ClientOptions,
16+
EndOfSupportWarning,
1617
} from '@aws-crypto/material-management-browser'
1718

1819
import { buildEncrypt } from '@aws-crypto/encrypt-browser'
@@ -21,6 +22,7 @@ import { buildDecrypt } from '@aws-crypto/decrypt-browser'
2122
export function buildClient(
2223
options: CommitmentPolicy | ClientOptions
2324
): ReturnType<typeof buildEncrypt> & ReturnType<typeof buildDecrypt> {
25+
console.warn(EndOfSupportWarning.v1)
2426
return {
2527
...buildEncrypt(options),
2628
...buildDecrypt(options),

modules/client-node/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export * from '@aws-crypto/raw-rsa-keyring-node'
1212
import {
1313
CommitmentPolicy,
1414
ClientOptions,
15+
EndOfSupportWarning,
1516
} from '@aws-crypto/material-management-node'
1617

1718
import { buildEncrypt } from '@aws-crypto/encrypt-node'
@@ -20,6 +21,7 @@ import { buildDecrypt, DecryptOutput } from '@aws-crypto/decrypt-node'
2021
export function buildClient(
2122
options: CommitmentPolicy | ClientOptions
2223
): ReturnType<typeof buildEncrypt> & ReturnType<typeof buildDecrypt> {
24+
console.warn(EndOfSupportWarning.v1)
2325
return {
2426
...buildEncrypt(options),
2527
...buildDecrypt(options),

modules/material-management-browser/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ export {
3535
PolicyOptions,
3636
MessageFormat,
3737
ClientOptions,
38+
EndOfSupportWarning,
3839
} from '@aws-crypto/material-management'

modules/material-management-node/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ export {
3838
PolicyOptions,
3939
MessageFormat,
4040
ClientOptions,
41+
EndOfSupportWarning,
4142
} from '@aws-crypto/material-management'

modules/material-management/src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,9 @@ export { needs } from './needs'
7777
export { cloneMaterial } from './clone_cryptographic_material'
7878

7979
export * from './types'
80+
81+
export enum EndOfSupportWarning {
82+
'v1' = 'This major version (1.x) of the AWS Encryption SDK for JavaScript has reached End-of-Support.\n' +
83+
'It will no longer receive security updates or bug fixes.\n' +
84+
'Consider updating to the latest version of the AWS Encryption SDK.',
85+
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"clean": "npm run clear-build-cache && lerna clean",
2020
"clear-build-cache": "rimraf ./modules/*/build/*",
2121
"lint": "run-s lint-*",
22-
"lint-eslint": "npx eslint modules/**/src/*.ts modules/**/test/**/*.ts",
2322
"lint-prettier": "prettier -c modules/**/src/*.ts modules/**/test/**/*.ts",
2423
"build-node": "tsc -b tsconfig.json",
2524
"build-browser": "tsc -b tsconfig.module.json",

0 commit comments

Comments
 (0)