Skip to content

Commit

Permalink
fix(@aws-amplify/datastore): introduce "settlement" guarantees to sto…
Browse files Browse the repository at this point in the history
…p() and clear() (aws-amplify#10450)

* fix(@aws-amplify/datastore): removed incorrect sync proc restart error

* Revert "revert: "fix(@aws-amplify/datastore): introduce "settlement" guarantees to stop() and clear()" (aws-amplify#10449)"

This reverts commit d726bcc.

* stash

* fixed automerge logic

* progress fixing errors on unawaited clear, then start

* removed bg procs closer cleaners and custom errors

* back to rejecting ops in transitional state; but with better errors for now

* updated sqlite adapter sanity test

* removed unused import from datastore.ts

* checkpoint; fixed mocks that lead to false positives, fixed code, left logging

* checkpoint; fixed pollution between jest mocks

* console logging cleanup

* Apply suggestions from code review

applying PR cleanup, typo fix suggestions

Co-authored-by: David McAfee <mcafd@amazon.com>

* removed unintentional changelog reformat

* re-added skipped test with comment; removed accidental file add

* removed leftover log lines and comments

Co-authored-by: David McAfee <mcafd@amazon.com>

* undoing changelog auto-format again?

Co-authored-by: David McAfee <mcafd@amazon.com>
Co-authored-by: Aaron S <94858815+stocaaro@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 21, 2022
1 parent 3199816 commit 16c535b
Show file tree
Hide file tree
Showing 36 changed files with 5,085 additions and 1,540 deletions.
8 changes: 7 additions & 1 deletion packages/amplify-ui-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"allowUnreachableCode": false,
"declaration": false,
"experimentalDecorators": true,
"lib": ["dom", "es2017", "ES2018.AsyncIterable", "ES2018.AsyncGenerator"],
"lib": [
"dom",
"es2017",
"ES2018.AsyncIterable",
"ES2018.AsyncGenerator",
"ES2020.Promise"
],
"moduleResolution": "node",
"module": "esnext",
"target": "es2017",
Expand Down
8 changes: 7 additions & 1 deletion packages/amplify-ui-vue/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"esModuleInterop": true,
"lib": ["dom", "es2015", "es2018.asynciterable", "es2018.asyncgenerator"],
"lib": [
"dom",
"es2015",
"es2018.asynciterable",
"es2018.asyncgenerator",
"es2020.promise"
],
"module": "es2015",
"moduleResolution": "node",
"noImplicitAny": true,
Expand Down
50 changes: 23 additions & 27 deletions packages/amplify-ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
//WARNING: If you are manually specifying files to compile then the tsconfig.json is completely ignored, you must use command line flags
{
"compilerOptions": {
"outDir": "./lib/",
"target": "es5",
"noImplicitAny": false,
"lib": [
"es5",
"es2015",
"dom",
"esnext.asynciterable",
"es2017.object"
],
"sourceMap": true,
"module": "commonjs",
"moduleResolution": "node",
"allowJs": false,
"declaration": true,
"typeRoots": [
"./node_modules/@types",
"../../node_modules/@types"
],
// temporary fix
"types": ["node", "lodash"]
},
"include": [
"src/**/*"
]
}
"compilerOptions": {
"outDir": "./lib/",
"target": "es5",
"noImplicitAny": false,
"lib": [
"es5",
"es2015",
"dom",
"esnext.asynciterable",
"es2017.object",
"es2020.promise"
],
"sourceMap": true,
"module": "commonjs",
"moduleResolution": "node",
"allowJs": false,
"declaration": true,
"typeRoots": ["./node_modules/@types", "../../node_modules/@types"],
// temporary fix
"types": ["node", "lodash"]
},
"include": ["src/**/*"]
}
4 changes: 2 additions & 2 deletions packages/auth/__tests__/auth-unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1910,9 +1910,9 @@ describe('auth unit test', () => {

const spyon2 = jest
.spyOn(Credentials, 'refreshFederatedToken')
.mockImplementationOnce(() => {
.mockImplementationOnce((() => {
return Promise.resolve('cred');
});
}) as any);

expect.assertions(1);
expect(await auth.currentUserCredentials()).toBe('cred');
Expand Down
Loading

0 comments on commit 16c535b

Please sign in to comment.