Skip to content

Commit ca13404

Browse files
authored
Merge branch 'main' into feat/pre-signed-upload-url
2 parents e1edfe6 + 4971ebd commit ca13404

File tree

14 files changed

+279
-2513
lines changed

14 files changed

+279
-2513
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ runs:
3030
${{ runner.os }}-build-artifacts-
3131
env:
3232
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
33-
# TODO We should be able to skip yarn / bootstrap if we cache enough things. Leaving because skipping causes issues.
33+
# TODO We should be able to skip yarn install if we cache enough things. Leaving because skipping causes issues.
3434
- name: Install
3535
if: inputs.is-prebuild != 'true' || steps.cache-build-artifacts.outputs.cache-hit != 'true'
3636
shell: bash
@@ -42,11 +42,6 @@ runs:
4242
echo "Attempt $i failed."
4343
sleep 5
4444
done
45-
- name: Bootstrap
46-
if: inputs.is-prebuild != 'true' || steps.cache-build-artifacts.outputs.cache-hit != 'true'
47-
run: yarn bootstrap
48-
shell: bash
49-
working-directory: ./amplify-js
5045
- name: Build packages
5146
if: steps.cache-build-artifacts.outputs.cache-hit != 'true'
5247
run: yarn build

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ jobs:
6969
run: yarn
7070
shell: bash
7171
working-directory: ./amplify-js
72-
- name: Bootstrap
73-
run: yarn bootstrap
74-
shell: bash
75-
working-directory: ./amplify-js
7672
- name: Build packages
7773
run: yarn build
7874
shell: bash

.github/workflows/callable-get-package-list.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ jobs:
3434
- name: Dump Package List
3535
if: steps.cache-package-list.outputs.cache-hit != 'true'
3636
run: |
37-
yarn lerna ll | egrep -v "lerna|Done|yarn" | jq -R -s -c 'split("\n")[:-1] | map({name: split(" ")[0], path: split(" ")[-1]})' > package-list.json
37+
# Get all workspaces and filter out private packages (examples and scripts)
38+
# This matches Lerna's behavior with "command.run.private: false"
39+
yarn workspaces info --json 2>&1 | sed -n '/^{/,/^}/p' | jq -c '
40+
to_entries |
41+
map({name: .key, path: .value.location}) |
42+
map(select(.path | (contains("/example") or startswith("scripts/")) | not))
43+
' > package-list.json
3844
- name: Get Package List
3945
id: get_package_list
4046
run: |

.github/workflows/callable-native-unit-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
env:
2626
TEST_PACKAGE: ${{ matrix.package.name }}
2727
run: |
28-
npx lerna exec --scope $TEST_PACKAGE yarn prepare:ios
29-
npx lerna exec --scope $TEST_PACKAGE yarn test:ios
28+
yarn workspace $TEST_PACKAGE prepare:ios
29+
yarn workspace $TEST_PACKAGE test:ios
3030
- name: Run Android Tests
3131
working-directory: ./amplify-js
3232
env:
3333
TEST_PACKAGE: ${{ matrix.package.name }}
3434
run: |
35-
npx lerna exec --scope $TEST_PACKAGE yarn prepare:android
36-
npx lerna exec --scope $TEST_PACKAGE yarn test:android
35+
yarn workspace $TEST_PACKAGE prepare:android
36+
yarn workspace $TEST_PACKAGE test:android

.github/workflows/callable-unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
working-directory: ./amplify-js
2525
env:
2626
TEST_PACKAGE: ${{ matrix.package.name }}
27-
run: npx lerna exec --scope $TEST_PACKAGE yarn test
27+
run: yarn workspace $TEST_PACKAGE test
2828
# disable temporarily
2929
# - name: Check coverage report existence
3030
# id: check-report

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
build
22
Config
3-
lerna-debug.log
43
node_modules
54
packages/*/node_modules/**
65
packages/**/lib/
@@ -75,6 +74,9 @@ coverage-ts/
7574
**/.rollup.cache
7675
**/buildMeta
7776

77+
# Turborepo
78+
.turbo
79+
7880
# ruby
7981
vendor/
8082
Gemfile.lock

.turborc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"telemetry": false
3+
}

CONTRIBUTING.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,13 @@ This section should get you running with **Amplify JS** and get you familiar wit
5353

5454
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).
5555

56-
> Note: newer versions of Yarn (2+) remove support for lerna's `--mutex` flag
57-
> so be sure to use Yarn v1.22.x
58-
5956
Start by [forking](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the main branch of [amplify-js](https://github.com/aws-amplify/amplify-js).
6057

6158
```
6259
git clone git@github.com:[username]/amplify-js.git
6360
cd amplify-js
6461
6562
yarn
66-
yarn bootstrap
6763
yarn build
6864
```
6965

@@ -139,7 +135,7 @@ Allowed patterns are stored in `.git/config` and apply only to your local reposi
139135
140136
## Architecture of the codebase
141137

142-
Amplify JS is a monorepo built with `Yarn` and `Lerna`. All the categories of Amplify live within the `packages` directory in the root. Each category inside packages has its own `src/` and `package.json`.
138+
Amplify JS is a monorepo built with `Yarn` and `Turborepo`. All the categories of Amplify live within the `packages` directory in the root. Each category inside packages has its own `src/` and `package.json`.
143139

144140
[**Packages inside Amplify JS Monorepo**](https://github.com/aws-amplify/amplify-js/tree/main/packages)
145141

@@ -170,15 +166,15 @@ yarn run test --scope @aws-amplify/auth
170166
#### Test in a local sample app
171167

172168
**Yarn Linking**
173-
The best way to develop locally and test is to link the individual package you’re working on and run lerna in watch mode.
169+
The best way to develop locally and test is to link the individual package you’re working on and run it in watch mode.
174170

175171
Note: to test using the react-native framework you will need to use [Verdaccio](#verdaccio)
176172

177173
Run watch mode while editing (auth for example):
178174

179175
```
180-
npx lerna exec --scope @aws-amplify/auth yarn link
181-
npx lerna exec --scope @aws-amplify/auth yarn build:watch
176+
yarn workspace @aws-amplify/auth link
177+
yarn workspace @aws-amplify/auth build:watch
182178
```
183179

184180
Or run the whole library in watch mode if you are working on multiple packages
@@ -280,7 +276,7 @@ _[Skip step 1 to 3 if you have already done this]_
280276

281277
1. Fork [`aws-amplify/amplify-js`](https://github.com/aws-amplify/amplify-js)
282278
2. Clone your fork locally: `git clone git@github.com:YOUR_GITHUB_USERNAME/amplify-js.git`
283-
3. Run `yarn && yarn bootstrap` in the repository root
279+
3. Run `yarn` in the repository root
284280
4. Within your fork, create a new branch based on the issue (e.g. Issue #123) you're addressing - `git checkout -b "group-token/short-token-[branch-name]"` or `git checkout -b "short-token/[branch-name]"`
285281
- Use grouping tokens at the beginning of the branch names. For e.g, if you are working on changes specific to `amplify-ui-components`, then you could start the branch name as `ui-components/...`
286282
- short token

lerna.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

license_config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@
4040
"**/rollup.config.mjs",
4141
"rollup",
4242
".husky",
43+
".turbo",
4344
"eslint.config.mjs",
44-
"packages/core/metadata"
45+
"packages/core/metadata",
46+
"packages/react-native/example/.bundle/config"
4547
],
4648
"ignoreFile": ".gitignore",
4749
"license": "license_header.txt",

0 commit comments

Comments
 (0)