Skip to content

Commit e0ed723

Browse files
authored
release: Amplify JS release (#14311)
2 parents 743b01e + 980e3f8 commit e0ed723

File tree

32 files changed

+3786
-3487
lines changed

32 files changed

+3786
-3487
lines changed

.github/actions/load-verdaccio-with-amplify-js/action.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
steps:
77
- name: Start verdaccio
88
run: |
9-
npx verdaccio@5.25.0 &
9+
npx verdaccio@6.0.5 &
1010
while ! nc -z localhost 4873; do
1111
echo "Verdaccio not running yet"
1212
sleep 1
@@ -15,17 +15,22 @@ runs:
1515
# Run your commands after verdaccio is up and running
1616
echo "Verdaccio is up and running, proceeding with the script..."
1717
shell: bash
18-
- name: Install and run npm-cli-login
18+
- name: Authenticate with Verdaccio
1919
shell: bash
2020
env:
2121
NPM_REGISTRY: http://localhost:4873/
2222
NPM_USER: verdaccio
2323
NPM_PASS: verdaccio
2424
NPM_EMAIL: [email protected]
2525
run: |
26-
npm i -g npm-cli-adduser
27-
npm-cli-adduser
28-
sleep 1
26+
TOKEN=$(curl -X PUT \
27+
-H "Content-Type: application/json" \
28+
-d "{\"name\": \"$NPM_USER\", \"password\": \"$NPM_PASS\"}" \
29+
$NPM_REGISTRY-/user/org.couchdb.user:$NPM_USER | jq -r '.token')
30+
31+
echo "registry=$NPM_REGISTRY
32+
//localhost:4873/:_authToken=$TOKEN" > ~/.npmrc
33+
2934
- name: Configure registry and git
3035
shell: bash
3136
working-directory: ./amplify-js

.github/actions/node-and-build/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ inputs:
77
runs:
88
using: 'composite'
99
steps:
10-
- name: Setup Node.js 18
11-
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
10+
- name: Setup Node.js 20
11+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
1212
with:
13-
node-version: 18.20.2
13+
node-version: 20
1414
env:
1515
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
1616
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0

.github/dependency-review/dependecy-review-config.yml renamed to .github/dependency-review/dependency-review-config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ allow-licenses:
1414
- 'CC0-1.0'
1515
- 'curl'
1616
- 'ISC'
17+
- 'ISC AND MIT'
1718
- 'JSON'
1819
- 'MIT'
1920
- 'OpenSSL'

.github/workflows/callable-canary-e2e-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ jobs:
5858
# Minimal depth 2 so we can checkout the commit before possible merge commit.
5959
fetch-depth: 2
6060
path: amplify-js
61-
- name: Setup Node.js 18
62-
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
61+
- name: Setup Node.js 20
62+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
6363
with:
64-
node-version: 18
64+
node-version: 20
6565
env:
6666
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
6767

.github/workflows/callable-dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
- name: 'Dependency Review'
1919
uses: actions/dependency-review-action@7bbfa034e752445ea40215fff1c3bf9597993d3f # v3.1.3 https://github.com/actions/dependency-review-action/commit/7bbfa034e752445ea40215fff1c3bf9597993d3f
2020
with:
21-
config-file: '.github/dependency-review/dependecy-review-config.yml'
21+
config-file: '.github/dependency-review/dependency-review-config.yml'
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build the API References and open a docs PR
2+
3+
on: workflow_call
4+
5+
jobs:
6+
docs-update-prep:
7+
name: Prepare for docs update
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Generate a temporary branch name for docs update PR
11+
id: generate-branch-name
12+
run: |
13+
echo "BRANCH_NAME=temp/amplify-js-$(date +%s)" >> "$GITHUB_OUTPUT"
14+
outputs:
15+
branch_name: ${{ steps.generate-branch-name.outputs.BRANCH_NAME }}
16+
17+
docs-update:
18+
name: Publish to amplify-js docs updates
19+
runs-on: ubuntu-latest
20+
needs: docs-update-prep
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
24+
with:
25+
path: amplify-js
26+
# Minimal depth 0 so we can fetch all git tags.
27+
fetch-depth: 0
28+
- name: Checkout docs repo
29+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
30+
with:
31+
repository: ${{ github.repository_owner }}/docs
32+
path: docs
33+
token: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
34+
35+
- name: Setup node and build the repository
36+
uses: ./amplify-js/.github/actions/node-and-build
37+
38+
- name: Set github commit user
39+
env:
40+
GITHUB_EMAIL: ${{ vars.GH_EMAIL }}
41+
GITHUB_USER: ${{ vars.GH_USER }}
42+
run: |
43+
git config --global user.email $GITHUB_EMAIL
44+
git config --global user.name $GITHUB_USER
45+
46+
- name: Build docs references
47+
working-directory: ./amplify-js
48+
run: |
49+
yarn run docs:references
50+
51+
- name: Update API references in the docs site
52+
working-directory: ./docs
53+
run: |
54+
yarn clean-references -- -p amplify-js
55+
git add .
56+
git commit --allow-empty -m "chore: Update amplify-js API references"
57+
58+
- name: Create a docs PR to merge api references back into the docs site
59+
working-directory: ./docs
60+
env:
61+
TEMP_BRANCH_NAME: ${{ needs.docs-update-prep.outputs.branch_name }}
62+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
63+
run: |
64+
git checkout -b $TEMP_BRANCH_NAME
65+
git push origin $TEMP_BRANCH_NAME
66+
gh pr create -B main -H $TEMP_BRANCH_NAME --title 'chore: amplify-js api references update' --body 'Merge the api references changes from the most recent release.'

.github/workflows/push-latest-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ jobs:
1818
contents: write
1919
secrets: inherit
2020
uses: ./.github/workflows/callable-npm-publish-release.yml
21+
publish-docs:
22+
needs:
23+
- release
24+
secrets: inherit
25+
uses: ./.github/workflows/callable-docs-update.yml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ packages/**/cypress/videos/
1818
package-lock.json
1919
packages/*/.watchmanconfig
2020
dual-publish-tmp
21+
docs/reference.json
2122

2223
### Version file - core build artifact
2324
packages/core/src/Platform/version.ts

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ export default [
166166
'n/no-callback-literal': 'off',
167167
'object-shorthand': 'error',
168168
'prefer-destructuring': 'off',
169+
'no-console': 'error',
169170

170171
'promise/catch-or-return': [
171172
'error',

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"test:github-actions": "node ./scripts/test-github-actions.js",
1616
"test:tsc-compliance": "yarn workspace tsc-compliance-test test:compliance",
1717
"docs": "typedoc",
18+
"docs:references": "typedoc --options typedoc.references.json",
1819
"build": "lerna run build --stream && yarn test:duplicates",
1920
"build:watch": "concurrently 'lerna run build:watch --parallel' --raw",
2021
"build:client-types": "cd scripts/dts-bundler && yarn && yarn run build",
@@ -80,7 +81,7 @@
8081
"@babel/preset-env": "^7.0.0",
8182
"@babel/preset-react": "^7.0.0",
8283
"@eslint/compat": "^1.2.0",
83-
"@lerna/legacy-package-management": "^7.4.2",
84+
"@lerna/legacy-package-management": "^8.2.1",
8485
"@rollup/plugin-typescript": "^11.1.6",
8586
"@size-limit/dual-publish": "^8.1.0",
8687
"@size-limit/file": "^8.1.0",
@@ -91,10 +92,10 @@
9192
"@types/lodash": "4.14.182",
9293
"@types/node": "^8.9.5",
9394
"@types/puppeteer": "1.3.0",
94-
"@typescript-eslint/eslint-plugin": "^8.8.0",
95-
"@typescript-eslint/parser": "^8.8.0",
95+
"@typescript-eslint/eslint-plugin": "^8.8.1",
96+
"@typescript-eslint/parser": "^8.8.1",
9697
"babel-loader": "^8.3.0",
97-
"eslint": "^9.11.1",
98+
"eslint": "^9.12.0",
9899
"eslint-config-prettier": "^9.1.0",
99100
"eslint-config-standard": "^17.1.0",
100101
"eslint-import-resolver-typescript": "^3.6.3",
@@ -110,7 +111,7 @@
110111
"jest": "^29.7.0",
111112
"jest-environment-jsdom": "^29.7.0",
112113
"json-loader": "^0.5.7",
113-
"lerna": "^7.4.2",
114+
"lerna": "^8.2.1",
114115
"license-check-and-add": "^4.0.5",
115116
"lint-staged": "^15.2.2",
116117
"mkdirp": "^3.0.1",

0 commit comments

Comments
 (0)