Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@aws-amplify/datastore): nextjs/swc broken build workaround #10765

Merged
merged 8 commits into from
Dec 13, 2022
55 changes: 54 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,40 @@ jobs:
spec: nested-predicate
browser: << parameters.browser >>

integ_next_datastore_13_basic:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/next/datastore/next-13-basic
steps:
- prepare_test_env
- integ_test_js:
test_name: 'DataStore - Nextjs 13 build with SWC - basic JS app'
framework: next
category: datastore
sample_name: next-13-basic
spec: nextjs-13-basic
browser: << parameters.browser >>

integ_next_datastore_13_js:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/next/datastore/next-13-js
steps:
- prepare_test_env
- integ_test_js:
test_name: 'DataStore - Nextjs 13 build with SWC - JS app'
framework: next
category: datastore
sample_name: next-13-js
spec: nextjs-13
browser: << parameters.browser >>

deploy:
executor: macos-executor
working_directory: ~/amplify-js
Expand Down Expand Up @@ -1910,7 +1944,24 @@ workflows:
matrix:
parameters:
<<: *test_browsers

- integ_next_datastore_13_basic:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers
- integ_next_datastore_13_js:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers
- deploy:
filters:
<<: *releasable_branches
Expand Down Expand Up @@ -1970,6 +2021,8 @@ workflows:
- integ_react_api_reconnect
- integ_react_datastore_selective_sync
- integ_react_datastore_nested_predicate
- integ_next_datastore_13_basic
- integ_next_datastore_13_js
- post_release:
filters:
branches:
Expand Down
2 changes: 1 addition & 1 deletion packages/datastore/src/datastore/datastore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ const createModelClass = <T extends PersistentModel>(
throw new Error(msg);
}

let patches;
let patches: Patch[] = [];
const model = produce(
source,
draft => {
Expand Down