Skip to content

Commit

Permalink
perf: release with aws-amplify v6
Browse files Browse the repository at this point in the history
BREAKING CHANGE: updated package to be compatible with aws-amplify v6
  • Loading branch information
thaddmt committed Nov 9, 2023
1 parent 1cb3e48 commit 38c50ea
Show file tree
Hide file tree
Showing 5 changed files with 305 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-samples-staging/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
shell: bash
working-directory: ./amplify-js-samples-staging
env:
BRANCH: increase-geo-timeout
BRANCH: next-geo
run: |
if git ls-remote --exit-code --heads origin $BRANCH >/dev/null 2>&1; then
# Branch exists, checkout and echo success message
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- release
- main
- geo
- next-geo

jobs:
e2e:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maplibre-gl-js-amplify",
"version": "3.0.0-thadd",
"version": "4.0.0",
"description": "MapLibre Plugin to Support Amplify Geo Integration",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -59,8 +59,8 @@
]
},
"devDependencies": {
"@aws-amplify/core": "console-preview",
"@aws-amplify/geo": "console-preview",
"@aws-amplify/core": "^6.x.x",
"@aws-amplify/geo": "^3.x.x",
"@babel/preset-env": "^7.22.9",
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
Expand All @@ -71,7 +71,7 @@
"@types/node": "^15.6.1",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"aws-amplify": "console-preview",
"aws-amplify": "^6.x.x",
"babel-jest": "^27.3.1",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
Expand Down
6 changes: 3 additions & 3 deletions src/AmplifyMapLibreRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import {
Signer,
jitteredExponentialRetry,
getAmplifyUserAgent,
AWSCredentials,
} from '@aws-amplify/core/internals/utils';
import { Geo, AmazonLocationServiceMapStyle } from '@aws-amplify/geo';
import { Map as MaplibreMap, RequestParameters, MapOptions } from 'maplibre-gl';
import { urlEncodePeriods } from './utils';
import { UserAgent as AWSUserAgent } from '@aws-sdk/types';
import { AuthSession } from '@aws-amplify/core/lib-esm/singleton/Auth/types';

/**
* The upgrade from maplibre v1 to maplibre v2 changed the `style` property from optional to required.
Expand All @@ -31,10 +31,10 @@ interface CreateMapOptions
*/

export default class AmplifyMapLibreRequest {
credentials: AuthSession['credentials'];
credentials: AWSCredentials;
region: string;
activeTimeout: number;
constructor(currentCredentials: AuthSession['credentials'], region: string) {
constructor(currentCredentials: AWSCredentials, region: string) {
this.credentials = currentCredentials;
this.region = region;
this.activeTimeout = null;
Expand Down
Loading

0 comments on commit 38c50ea

Please sign in to comment.