Skip to content

Commit d9018ae

Browse files
authored
release: Amplify JS release (#14223)
2 parents 5c57edf + 406157d commit d9018ae

File tree

6 files changed

+122
-38
lines changed

6 files changed

+122
-38
lines changed

.github/CODEOWNERS

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@
1515

1616
# The following paths involve server-side use cases, token/user session management.
1717
# Changes made to these paths requires additional reviews and approvals.
18-
/packages/auth @sktimalsina @cshfang @HuiSF @pranavosu
19-
/packages/aws-amplify/src/adapter-core @sktimalsina @cshfang @HuiSF @pranavosu
20-
/packages/core/src/adapterCore @sktimalsina @cshfang @HuiSF @pranavosu
21-
/packages/core/src/singleton @sktimalsina @cshfang @HuiSF @pranavosu
22-
/packages/core/src/utils/convert @sktimalsina @cshfang @HuiSF @pranavosu
23-
/packages/core/src/utils/WordArray.ts @sktimalsina @cshfang @HuiSF @pranavosu
24-
/packages/core/src/storage @sktimalsina @cshfang @HuiSF @pranavosu
25-
/packages/core/src/utils/generateRandomString.ts @sktimalsina @cshfang @HuiSF @pranavosu
26-
/packages/core/src/utils/globalHelpers @sktimalsina @cshfang @HuiSF @pranavosu
27-
/packages/core/src/utils/urlSafeDecode.ts @sktimalsina @cshfang @HuiSF @pranavosu
28-
/packages/core/src/awsClients/cognitoIdentity @sktimalsina @cshfang @HuiSF @pranavosu
29-
/packages/core/src/clients/internal @sktimalsina @cshfang @HuiSF @pranavosu
30-
/packages/core/src/Hub @sktimalsina @cshfang @HuiSF @pranavosu
31-
/packages/adapter-nextjs @sktimalsina @cshfang @HuiSF @pranavosu
32-
/packages/rtn-web-browser @sktimalsina @cshfang @HuiSF @pranavosu
33-
/packages/storage/src/providers/s3/apis/internal @sktimalsina @cshfang @HuiSF @pranavosu
34-
/packages/storage/src/providers/s3/apis/server @sktimalsina @cshfang @HuiSF @pranavosu
35-
/packages/api-rest/src/apis/server.ts @sktimalsina @cshfang @HuiSF @pranavosu
36-
/packages/api-rest/src/apis/common/internalPost.ts @sktimalsina @cshfang @HuiSF @pranavosu
37-
/packages/api-graphql/src/server @sktimalsina @cshfang @HuiSF @pranavosu
38-
/packages/api-graphql/src/internals/server @sktimalsina @cshfang @HuiSF @pranavosu
18+
/packages/auth @cshfang @HuiSF @ashika112
19+
/packages/aws-amplify/src/adapter-core @cshfang @HuiSF @ashika112
20+
/packages/core/src/adapterCore @cshfang @HuiSF @ashika112
21+
/packages/core/src/singleton @cshfang @HuiSF @ashika112
22+
/packages/core/src/utils/convert @cshfang @HuiSF @ashika112
23+
/packages/core/src/utils/WordArray.ts @cshfang @HuiSF @ashika112
24+
/packages/core/src/storage @cshfang @HuiSF @ashika112
25+
/packages/core/src/utils/generateRandomString.ts @cshfang @HuiSF @ashika112
26+
/packages/core/src/utils/globalHelpers @cshfang @HuiSF @ashika112
27+
/packages/core/src/utils/urlSafeDecode.ts @cshfang @HuiSF @ashika112
28+
/packages/core/src/awsClients/cognitoIdentity @cshfang @HuiSF @ashika112
29+
/packages/core/src/clients/internal @cshfang @HuiSF @ashika112
30+
/packages/core/src/Hub @cshfang @HuiSF @ashika112
31+
/packages/adapter-nextjs @cshfang @HuiSF @ashika112
32+
/packages/rtn-web-browser @cshfang @HuiSF @ashika112
33+
/packages/storage/src/providers/s3/apis/internal @cshfang @HuiSF @ashika112
34+
/packages/storage/src/providers/s3/apis/server @cshfang @HuiSF @ashika112
35+
/packages/api-rest/src/apis/server.ts @cshfang @HuiSF @ashika112
36+
/packages/api-rest/src/apis/common/internalPost.ts @cshfang @HuiSF @ashika112
37+
/packages/api-graphql/src/server @cshfang @HuiSF @ashika112
38+
/packages/api-graphql/src/internals/server @cshfang @HuiSF @ashika112

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Our work is done directly on Github and PR's are sent to the GitHub repo by core
5050

5151
This section should get you running with **Amplify JS** and get you familiar with the basics of the codebase. You will need [Node.js](https://nodejs.org/en/) on your system and developing locally also requires `yarn` workspaces. You can install it [here](https://classic.yarnpkg.com/en/docs/install#mac-stable).
5252

53-
The recommended version of Node JS to work with this project is [`16.19.0`](https://nodejs.org/en/blog/release/v16.19.0/) with Yarn version [`1.22.x`](https://github.com/yarnpkg/yarn/blob/master/CHANGELOG.md).
53+
The recommended version of Node JS to work with this project is [`18.18.0`](https://nodejs.org/en/blog/release/v18.18.0/) with Yarn version [`1.22.x`](https://github.com/yarnpkg/yarn/blob/master/CHANGELOG.md).
5454

5555
> Note: newer versions of Yarn (2+) remove support for lerna's `--mutex` flag
5656
> so be sure to use Yarn v1.22.x

packages/adapter-nextjs/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
"version": "1.5.0",
55
"description": "The adapter for the supporting of using Amplify APIs in Next.js.",
66
"peerDependencies": {
7-
"aws-amplify": "^6.13.0",
7+
"aws-amplify": "^6.13.1",
88
"next": ">=13.5.0 <16.0.0"
99
},
1010
"dependencies": {
11-
"aws-jwt-verify": "^4.0.1",
12-
"cookie": "^0.7.0"
11+
"aws-jwt-verify": "^4.0.1"
1312
},
1413
"devDependencies": {
15-
"@types/cookie": "^0.5.1",
1614
"@types/node": "^20.3.1",
1715
"@types/react": "^18.2.13",
1816
"@types/react-dom": "^18.2.6",

packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"@aws-sdk/types": "3.398.0",
5555
"@smithy/util-hex-encoding": "2.0.0",
5656
"@types/uuid": "^9.0.0",
57-
"cookie": "^0.7.0",
5857
"js-cookie": "^3.0.5",
5958
"rxjs": "^7.8.1",
6059
"tslib": "^2.5.0",

packages/core/src/adapterCore/serverContext/types/cookieStorage.ts

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,104 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import { CookieSerializeOptions } from 'cookie';
4+
interface CookieSerializeOptions {
5+
/**
6+
* Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.3|Domain Set-Cookie attribute}. By default, no
7+
* domain is set, and most clients will consider the cookie to apply to only
8+
* the current domain.
9+
*/
10+
domain?: string | undefined;
11+
12+
/**
13+
* Specifies a function that will be used to encode a cookie's value. Since
14+
* value of a cookie has a limited character set (and must be a simple
15+
* string), this function can be used to encode a value into a string suited
16+
* for a cookie's value.
17+
*
18+
* The default function is the global `encodeURIComponent`, which will
19+
* encode a JavaScript string into UTF-8 byte sequences and then URL-encode
20+
* any that fall outside of the cookie range.
21+
*/
22+
encode?(value: string): string;
23+
24+
/**
25+
* Specifies the `Date` object to be the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.1|`Expires` `Set-Cookie` attribute}. By default,
26+
* no expiration is set, and most clients will consider this a "non-persistent cookie" and will delete
27+
* it on a condition like exiting a web browser application.
28+
*
29+
* *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification}
30+
* states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
31+
* possible not all clients by obey this, so if both are set, they should
32+
* point to the same date and time.
33+
*/
34+
expires?: Date | undefined;
35+
/**
36+
* Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.6|`HttpOnly` `Set-Cookie` attribute}.
37+
* When truthy, the `HttpOnly` attribute is set, otherwise it is not. By
38+
* default, the `HttpOnly` attribute is not set.
39+
*
40+
* *Note* be careful when setting this to true, as compliant clients will
41+
* not allow client-side JavaScript to see the cookie in `document.cookie`.
42+
*/
43+
httpOnly?: boolean | undefined;
44+
/**
45+
* Specifies the number (in seconds) to be the value for the `Max-Age`
46+
* `Set-Cookie` attribute. The given number will be converted to an integer
47+
* by rounding down. By default, no maximum age is set.
48+
*
49+
* *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification}
50+
* states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
51+
* possible not all clients by obey this, so if both are set, they should
52+
* point to the same date and time.
53+
*/
54+
maxAge?: number | undefined;
55+
/**
56+
* Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.4|`Path` `Set-Cookie` attribute}.
57+
* By default, the path is considered the "default path".
58+
*/
59+
path?: string | undefined;
60+
/**
61+
* Specifies the `string` to be the value for the [`Priority` `Set-Cookie` attribute][rfc-west-cookie-priority-00-4.1].
62+
*
63+
* - `'low'` will set the `Priority` attribute to `Low`.
64+
* - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
65+
* - `'high'` will set the `Priority` attribute to `High`.
66+
*
67+
* More information about the different priority levels can be found in
68+
* [the specification][rfc-west-cookie-priority-00-4.1].
69+
*
70+
* **note** This is an attribute that has not yet been fully standardized, and may change in the future.
71+
* This also means many clients may ignore this attribute until they understand it.
72+
*/
73+
priority?: 'low' | 'medium' | 'high' | undefined;
74+
/**
75+
* Specifies the boolean or string to be the value for the {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|`SameSite` `Set-Cookie` attribute}.
76+
*
77+
* - `true` will set the `SameSite` attribute to `Strict` for strict same
78+
* site enforcement.
79+
* - `false` will not set the `SameSite` attribute.
80+
* - `'lax'` will set the `SameSite` attribute to Lax for lax same site
81+
* enforcement.
82+
* - `'strict'` will set the `SameSite` attribute to Strict for strict same
83+
* site enforcement.
84+
* - `'none'` will set the SameSite attribute to None for an explicit
85+
* cross-site cookie.
86+
*
87+
* More information about the different enforcement levels can be found in {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|the specification}.
88+
*
89+
* *note* This is an attribute that has not yet been fully standardized, and may change in the future. This also means many clients may ignore this attribute until they understand it.
90+
*/
91+
sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
92+
/**
93+
* Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.5|`Secure` `Set-Cookie` attribute}. When truthy, the
94+
* `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set.
95+
*
96+
* *Note* be careful when setting this to `true`, as compliant clients will
97+
* not send the cookie back to the server in the future if the browser does
98+
* not have an HTTPS connection.
99+
*/
100+
secure?: boolean | undefined;
101+
}
5102

6103
export declare namespace CookieStorage {
7104
export type SetCookieOptions = Partial<

yarn.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)