Skip to content

Commit

Permalink
Merge branch 'main' into expo-sqlite-adapter-codesharing
Browse files Browse the repository at this point in the history
  • Loading branch information
chintannp committed Mar 2, 2022
2 parents ceb5c8e + 6117e71 commit 910fe94
Show file tree
Hide file tree
Showing 68 changed files with 501 additions and 173 deletions.
2 changes: 1 addition & 1 deletion .github/actions/bundle-size-action/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.1.0",
"karma": "~6.3.14",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/bundle-size-action/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"@next/bundle-analyzer": "^10.0.7",
"aws-amplify": "unstable",
"next": "^11.1.3",
"next": "^12.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
Expand Down
8 changes: 4 additions & 4 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -205,23 +205,23 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.6.1)
mini_portile2 (2.8.0)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.14.4)
multipart-post (2.1.1)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
nokogiri (1.13.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
octokit (4.20.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
racc (1.5.2)
racc (1.6.0)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
},
"homepage": "https://aws-amplify.github.io/",
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/cli": "7.17.0",
"@babel/core": "7.17.2",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@types/jest": "^24.0.18",
Expand Down
12 changes: 12 additions & 0 deletions packages/amazon-cognito-identity-js/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [5.2.7](https://github.com/aws-amplify/amplify-js/compare/amazon-cognito-identity-js@5.2.6...amazon-cognito-identity-js@5.2.7) (2022-02-28)


### Bug Fixes

* pin async storage to 1.15.17 ([#9570](https://github.com/aws-amplify/amplify-js/issues/9570)) ([bc5235a](https://github.com/aws-amplify/amplify-js/commit/bc5235ac0d15242f7a13457f40999b5331823395))
* pin babel-core and babel-cli version ([#9593](https://github.com/aws-amplify/amplify-js/issues/9593)) ([a0fc830](https://github.com/aws-amplify/amplify-js/commit/a0fc830626ea5466555f2f60d66cc496145a5d1b))





## [5.2.6](https://github.com/aws-amplify/amplify-js/compare/amazon-cognito-identity-js@5.2.5...amazon-cognito-identity-js@5.2.6) (2022-02-03)

**Note:** Version bump only for package amazon-cognito-identity-js
Expand Down
6 changes: 3 additions & 3 deletions packages/amazon-cognito-identity-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "amazon-cognito-identity-js",
"description": "Amazon Cognito Identity Provider JavaScript SDK",
"version": "5.2.6",
"version": "5.2.7",
"author": {
"name": "Amazon Web Services",
"email": "aws@amazon.com",
Expand Down Expand Up @@ -75,8 +75,8 @@
"js-cookie": "^2.2.1"
},
"devDependencies": {
"@babel/cli": "^7.7.4",
"@babel/core": "^7.7.4",
"@babel/cli": "7.17.0",
"@babel/core": "7.17.2",
"@babel/preset-env": "^7.7.4",
"@babel/preset-react": "^7.0.0",
"@react-native-async-storage/async-storage": "1.15.17",
Expand Down
8 changes: 8 additions & 0 deletions packages/amplify-ui-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.0.42](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-angular@1.0.41...@aws-amplify/ui-angular@1.0.42) (2022-02-28)

**Note:** Version bump only for package @aws-amplify/ui-angular





## [1.0.41](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-angular@1.0.40...@aws-amplify/ui-angular@1.0.41) (2022-02-03)

**Note:** Version bump only for package @aws-amplify/ui-angular
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-ui-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/ui-angular",
"private": "true",
"version": "1.0.41",
"version": "1.0.42",
"description": "Angular specific wrapper for @aws-amplify/ui-components",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -32,7 +32,7 @@
"dist/"
],
"dependencies": {
"@aws-amplify/ui-components": "1.9.12"
"@aws-amplify/ui-components": "1.9.13"
},
"devDependencies": {
"@angular/compiler-cli": "^7.2.1",
Expand Down
8 changes: 8 additions & 0 deletions packages/amplify-ui-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.9.13](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-components@1.9.12...@aws-amplify/ui-components@1.9.13) (2022-02-28)

**Note:** Version bump only for package @aws-amplify/ui-components





## [1.9.12](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-components@1.9.11...@aws-amplify/ui-components@1.9.12) (2022-02-03)

**Note:** Version bump only for package @aws-amplify/ui-components
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-ui-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/ui-components",
"private": "true",
"version": "1.9.12",
"version": "1.9.13",
"description": "Core Amplify UI Component Library",
"module": "dist/index.mjs",
"main": "dist/index.js",
Expand Down Expand Up @@ -43,7 +43,7 @@
"uuid": "^8.2.0"
},
"devDependencies": {
"@aws-amplify/auth": "4.4.1",
"@aws-amplify/auth": "4.4.2",
"@stencil/angular-output-target": "^0.0.2",
"@stencil/core": "1.15.0",
"@stencil/eslint-plugin": "0.2.1",
Expand Down
8 changes: 8 additions & 0 deletions packages/amplify-ui-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.2.33](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-react@1.2.32...@aws-amplify/ui-react@1.2.33) (2022-02-28)

**Note:** Version bump only for package @aws-amplify/ui-react





## [1.2.32](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-react@1.2.31...@aws-amplify/ui-react@1.2.32) (2022-02-03)

**Note:** Version bump only for package @aws-amplify/ui-react
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-ui-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@aws-amplify/ui-react",
"private": "true",
"sideEffects": false,
"version": "1.2.32",
"version": "1.2.33",
"description": "React specific wrapper for @aws-amplify/ui-components",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -33,7 +33,7 @@
"typescript": "^3.3.4000"
},
"dependencies": {
"@aws-amplify/ui-components": "1.9.12"
"@aws-amplify/ui-components": "1.9.13"
},
"peerDependencies": {
"react": ">= 16.7.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/amplify-ui-storybook/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.33](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-storybook@2.0.32...@aws-amplify/ui-storybook@2.0.33) (2022-02-28)

**Note:** Version bump only for package @aws-amplify/ui-storybook





## [2.0.32](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-storybook@2.0.31...@aws-amplify/ui-storybook@2.0.32) (2022-02-03)

**Note:** Version bump only for package @aws-amplify/ui-storybook
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-ui-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/ui-storybook",
"version": "2.0.32",
"version": "2.0.33",
"private": true,
"dependencies": {
"@aws-amplify/ui-react": "0.2.38",
Expand All @@ -10,7 +10,7 @@
"@types/node": "^12.0.0",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"aws-amplify": "4.3.14",
"aws-amplify": "4.3.15",
"react": "^16.12.0",
"react-app-polyfill": "^1.0.6",
"react-dom": "^16.12.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/amplify-ui-vue/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.1.27](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-vue@1.1.26...@aws-amplify/ui-vue@1.1.27) (2022-02-28)

**Note:** Version bump only for package @aws-amplify/ui-vue





## [1.1.26](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/ui-vue@1.1.25...@aws-amplify/ui-vue@1.1.26) (2022-02-03)

**Note:** Version bump only for package @aws-amplify/ui-vue
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-ui-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@aws-amplify/ui-vue",
"private": "true",
"sideEffects": true,
"version": "1.1.26",
"version": "1.1.27",
"description": "Vue specific wrapper for @aws-amplify/ui-components",
"publishConfig": {
"access": "public"
Expand All @@ -18,7 +18,7 @@
"url": "https://github.com/aws-amplify/amplify-js.git"
},
"dependencies": {
"@aws-amplify/ui-components": "1.9.12"
"@aws-amplify/ui-components": "1.9.13"
},
"devDependencies": {
"rimraf": "^3.0.2"
Expand Down
16 changes: 16 additions & 0 deletions packages/analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [5.2.0](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/analytics@5.1.12...@aws-amplify/analytics@5.2.0) (2022-02-28)


### Bug Fixes

* **@aws-amplify/analytics:** Analytics/types hotfix ([#9648](https://github.com/aws-amplify/amplify-js/issues/9648)) ([ad45ef6](https://github.com/aws-amplify/amplify-js/commit/ad45ef6538675b59b15eba513eab916e8b5d36e1))


### Features

* **@aws-amplify/analytics:** Analytics Typescript updates ([#9272](https://github.com/aws-amplify/amplify-js/issues/9272)) ([9a52c2b](https://github.com/aws-amplify/amplify-js/commit/9a52c2b6a59bf0d9622a2572f8752b7b419c0817))





## [5.1.12](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/analytics@5.1.11...@aws-amplify/analytics@5.1.12) (2022-02-03)

**Note:** Version bump only for package @aws-amplify/analytics
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/analytics",
"version": "5.1.12",
"version": "5.2.0",
"description": "Analytics category of aws-amplify",
"main": "./lib/index.js",
"module": "./lib-esm/index.js",
Expand Down Expand Up @@ -43,8 +43,8 @@
},
"homepage": "https://aws-amplify.github.io/",
"dependencies": {
"@aws-amplify/cache": "4.0.34",
"@aws-amplify/core": "4.3.14",
"@aws-amplify/cache": "4.0.35",
"@aws-amplify/core": "4.4.0",
"@aws-sdk/client-firehose": "3.6.1",
"@aws-sdk/client-kinesis": "3.6.1",
"@aws-sdk/client-personalize-events": "3.6.1",
Expand Down
17 changes: 14 additions & 3 deletions packages/analytics/src/Analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ import {
EventAttributes,
EventMetrics,
AnalyticsEvent,
AutoTrackOpts,
AutoTrackSessionOpts,
AutoTrackPageViewOpts,
AutoTrackEventOpts,
} from './types';
import { PageViewTracker, EventTracker, SessionTracker } from './trackers';

Expand Down Expand Up @@ -62,7 +64,7 @@ export class AnalyticsClass {
private _config;
private _pluggables: AnalyticsProvider[];
private _disabled: boolean;
private _trackers: Trackers;
private _trackers: Trackers | {};

/**
* Initialize Analtyics
Expand All @@ -72,6 +74,7 @@ export class AnalyticsClass {
this._config = {};
this._pluggables = [];
this._disabled = false;
this._trackers = {};
_instance = this;

this.record = this.record.bind(this);
Expand Down Expand Up @@ -298,7 +301,15 @@ export class AnalyticsClass {
* @param trackerType - The type of tracker to activate.
* @param [opts] - Auto tracking options.
*/
public autoTrack(trackerType: TrackerTypes, opts: AutoTrackOpts) {
public autoTrack(trackerType: 'session', opts: AutoTrackSessionOpts);
public autoTrack(trackerType: 'pageView', opts: AutoTrackPageViewOpts);
public autoTrack(trackerType: 'event', opts: AutoTrackEventOpts);
// ensures backwards compatibility for non-pinpoint provider users
public autoTrack(
trackerType: TrackerTypes,
opts: { provider: string; [key: string]: any }
);
public autoTrack(trackerType: TrackerTypes, opts: { [key: string]: any }) {
if (!trackers[trackerType]) {
logger.debug('invalid tracker type');
return;
Expand Down
25 changes: 23 additions & 2 deletions packages/analytics/src/types/Analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,31 @@ export interface SessionTrackOpts {
provider?: string;
}

export interface AutoTrackOpts {
export type AutoTrackAttributes =
| (() => EventAttributes | Promise<EventAttributes>)
| EventAttributes;

export interface AutoTrackSessionOpts {
enable: boolean;
attributes?: EventAttributes;
attributes?: AutoTrackAttributes;
provider?: string;
}

export interface AutoTrackPageViewOpts {
enable: boolean;
eventName?: string;
attributes?: AutoTrackAttributes;
type?: 'SPA' | 'multiPageApp';
provider?: string;
getUrl?: () => string;
}

export interface AutoTrackEventOpts {
enable: boolean;
events?: string[];
selectorPrefix?: string;
provider?: string;
attributes?: AutoTrackAttributes;
}

export interface AnalyticsEvent {
Expand Down
11 changes: 11 additions & 0 deletions packages/api-graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.2.22](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api-graphql@2.2.21...@aws-amplify/api-graphql@2.2.22) (2022-02-28)


### Bug Fixes

* **@aws-amplify/api:** Improve API.graphql return type ([#9197](https://github.com/aws-amplify/amplify-js/issues/9197)) ([9a0531b](https://github.com/aws-amplify/amplify-js/commit/9a0531b11e9eb6659d36ca0c51c642b3d947f63c))





## [2.2.21](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api-graphql@2.2.20...@aws-amplify/api-graphql@2.2.21) (2022-02-03)

**Note:** Version bump only for package @aws-amplify/api-graphql
Expand Down
Loading

0 comments on commit 910fe94

Please sign in to comment.