Skip to content

Commit

Permalink
fix package.json files pointing to mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
HuiSF committed Nov 1, 2023
1 parent 7a127f7 commit d5aa87a
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 38 deletions.
4 changes: 2 additions & 2 deletions packages/adapter-nextjs/api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/adapter-nextjs/api",
"main": "../lib/api/index.js",
"browser": "../lib-esm/api/index.js",
"module": "../lib-esm/api/index.js",
"browser": "../lib-esm/api/index.mjs",
"module": "../lib-esm/api/index.mjs",
"typings": "../lib-esm/api/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/adapter-nextjs/internals/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/adapter-nextjs/internals",
"main": "../lib/internals/index.js",
"browser": "../lib-esm/internals/index.js",
"module": "../lib-esm/internals/index.js",
"browser": "../lib-esm/internals/index.mjs",
"module": "../lib-esm/internals/index.mjs",
"typings": "../lib-esm/internals/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/analytics/kinesis-firehose/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/analytics/kinesis-firehose",
"main": "../lib/providers/kinesis-firehose/index.js",
"browser": "../lib-esm/providers/kinesis-firehose/index.js",
"module": "../lib-esm/providers/kinesis-firehose/index.js",
"browser": "../lib-esm/providers/kinesis-firehose/index.mjs",
"module": "../lib-esm/providers/kinesis-firehose/index.mjs",
"typings": "../lib-esm/providers/kinesis-firehose/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/analytics/kinesis/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/analytics/kinesis",
"main": "../lib/providers/kinesis/index.js",
"browser": "../lib-esm/providers/kinesis/index.js",
"module": "../lib-esm/providers/kinesis/index.js",
"browser": "../lib-esm/providers/kinesis/index.mjs",
"module": "../lib-esm/providers/kinesis/index.mjs",
"typings": "../lib-esm/providers/kinesis/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/analytics/personalize/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/analytics/personalize",
"main": "../lib/providers/personalize/index.js",
"browser": "../lib-esm/providers/personalize/index.js",
"module": "../lib-esm/providers/personalize/index.js",
"browser": "../lib-esm/providers/personalize/index.mjs",
"module": "../lib-esm/providers/personalize/index.mjs",
"typings": "../lib-esm/providers/personalize/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/analytics/pinpoint/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/analytics/pinpoint",
"main": "../lib/providers/pinpoint/index.js",
"browser": "../lib-esm/providers/pinpoint/index.js",
"module": "../lib-esm/providers/pinpoint/index.js",
"browser": "../lib-esm/providers/pinpoint/index.mjs",
"module": "../lib-esm/providers/pinpoint/index.mjs",
"typings": "../lib-esm/providers/pinpoint/index.d.ts"
}
8 changes: 7 additions & 1 deletion packages/analytics/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ const config = defineConfig([
// },
// ESM config
{
input: ['src/index.ts'],
input: [
'src/index.ts',
'src/providers/kinesis/index.ts',
'src/providers/kinesis-firehose/index.ts',
'src/providers/personalize/index.ts',
'src/providers/pinpoint/index.ts',
],
output: {
dir: esmOutputDir,
format: 'es',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
CognitoUserPoolsTokenProvider,
cognitoCredentialsProvider,
} from '../../../src/providers/cognito';
import { decodeJWT } from '@aws-amplify/core/lib-esm/libraryUtils';
import { decodeJWT } from '@aws-amplify/core/internals/utils';

describe('fetchAuthSession behavior for IdentityPools only', () => {
let credentialsProviderSpy;
Expand Down
1 change: 1 addition & 0 deletions packages/aws-amplify/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const config = defineConfig([
// ESM config
{
input: [
'src/utils/index.ts',
'src/index.ts',
'src/adapterCore/index.ts',
'src/analytics/index.ts',
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-amplify/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "aws-amplify/utils",
"main": "../lib/utils/index.js",
"browser": "../lib-esm/utils/index.js",
"module": "../lib-esm/utils/index.js",
"browser": "../lib-esm/utils/index.mjs",
"module": "../lib-esm/utils/index.mjs",
"typings": "../lib-esm/utils/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/core/internals/adapter-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@aws-amplify/core/internals/adapter-core",
"types": "../../lib-esm/adapterCore/index.d.ts",
"main": "../../lib/adapterCore/index.js",
"module": "../../lib-esm/adapterCore/index.js",
"react-native": "../../lib-esm/adapterCore/index.js",
"module": "../../lib-esm/adapterCore/index.mjs",
"react-native": "../../lib-esm/adapterCore/index.mjs",
"sideEffects": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@aws-amplify/core/internals/aws-client-utils/composers",
"types": "../../../lib-esm/clients/internal/index.d.ts",
"main": "../../../lib/clients/internal/index.js",
"module": "../../../lib-esm/clients/internal/index.js",
"react-native": "../../../lib-esm/clients/internal/index.js",
"module": "../../../lib-esm/clients/internal/index.mjs",
"react-native": "../../../lib-esm/clients/internal/index.mjs",
"sideEffects": false
}
6 changes: 3 additions & 3 deletions packages/core/internals/aws-client-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@aws-amplify/core/internals/aws-client-utils",
"types": "../../lib-esm/clients/index.d.ts",
"main": "../../lib/clients/index.js",
"module": "../../lib-esm/clients/index.js",
"react-native": "../../lib-esm/clients/index.js",
"module": "../../lib-esm/clients/index.mjs",
"react-native": "../../lib-esm/clients/index.mjs",
"sideEffects": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@aws-amplify/core/internals/aws-clients/cognitoIdentity",
"types": "../../../lib-esm/awsClients/cognitoIdentity/index.d.ts",
"main": "../../../lib/awsClients/cognitoIdentity/index.js",
"module": "../../../lib-esm/awsClients/cognitoIdentity/index.js",
"react-native": "../../../lib-esm/awsClients/cognitoIdentity/index.js",
"module": "../../../lib-esm/awsClients/cognitoIdentity/index.mjs",
"react-native": "../../../lib-esm/awsClients/cognitoIdentity/index.mjs",
"sideEffects": false
}
6 changes: 3 additions & 3 deletions packages/core/internals/aws-clients/pinpoint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@aws-amplify/core/internals/aws-clients/pinpoint",
"types": "../../../lib-esm/awsClients/pinpoint/index.d.ts",
"main": "../../../lib/awsClients/pinpoint/index.js",
"module": "../../../lib-esm/awsClients/pinpoint/index.js",
"react-native": "../../../lib-esm/awsClients/pinpoint/index.js",
"module": "../../../lib-esm/awsClients/pinpoint/index.mjs",
"react-native": "../../../lib-esm/awsClients/pinpoint/index.mjs",
"sideEffects": false
}
}
4 changes: 2 additions & 2 deletions packages/core/internals/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "@aws-amplify/core/internals/utils",
"types": "../../lib-esm/libraryUtils.d.ts",
"main": "../../lib/libraryUtils.js",
"module": "../../lib-esm/libraryUtils.js",
"react-native": "../../lib-esm/libraryUtils.js"
"module": "../../lib-esm/libraryUtils.mjs",
"react-native": "../../lib-esm/libraryUtils.mjs"
}
4 changes: 2 additions & 2 deletions packages/storage/s3/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/storage/s3",
"main": "../lib/providers/s3/index.js",
"browser": "../lib-esm/providers/s3/index.js",
"module": "../lib-esm/providers/s3/index.js",
"browser": "../lib-esm/providers/s3/index.mjs",
"module": "../lib-esm/providers/s3/index.mjs",
"typings": "../lib-esm/providers/s3/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/storage/s3/server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-amplify/storage/s3/server",
"main": "../../lib/providers/s3/server.js",
"browser": "../../lib-esm/providers/s3/server.js",
"module": "../../lib-esm/providers/s3/server.js",
"browser": "../../lib-esm/providers/s3/server.mjs",
"module": "../../lib-esm/providers/s3/server.mjs",
"typings": "../../lib-esm/providers/s3/server.d.ts"
}
8 changes: 4 additions & 4 deletions packages/storage/server/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@aws-amplify/storage/server",
"types": "../lib-esm/server.d.ts",
"main": "../lib/server.js",
"module": "../lib-esm/server.js",
"react-native": "../lib-esm/server.js",
"main": "../lib/server.mjs",
"module": "../lib-esm/server.mjs",
"react-native": "../lib-esm/server.mjs",
"sideEffects": false
}
}

0 comments on commit d5aa87a

Please sign in to comment.