From 362059eeab934af12e7121c0bda0776a38807325 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:16:56 -0700 Subject: [PATCH 1/8] add a pull request template --- .github/pull_request_template.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..b133938 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,23 @@ +### Added +- + +### Changed +- + +### Deprecated +- + +### Removed +- + +### Fixed +- + +### Security +- + +--- + +### Release PR Checklist +- [ ] Update version number in package.json +- [ ] After merge, publish to npmjs.com From 008880e3551643e5bd578596499ba6fe954c67e2 Mon Sep 17 00:00:00 2001 From: Jason Gutierrez Date: Fri, 29 Dec 2023 00:45:58 -0600 Subject: [PATCH 2/8] Update loader.js This resolves the warning from Google API. --- src/loader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/loader.js b/src/loader.js index a08d978..a4373b0 100644 --- a/src/loader.js +++ b/src/loader.js @@ -43,9 +43,9 @@ export function loadGooglePlacesLibrary(apiKey, callback) { const element = document.createElement('script') element.async = true element.defer = true - element.onload = onLibraryLoaded - element.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&libraries=places` + element.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&libraries=places&callback=onLibraryLoaded` element.type = 'text/javascript' + window.onLibraryLoaded = onLibraryLoaded document.head.appendChild(element) } From c923dad77aa07ea1f1da1951e8891b9c81462d44 Mon Sep 17 00:00:00 2001 From: Jason Gutierrez Date: Mon, 4 Mar 2024 18:30:20 -0600 Subject: [PATCH 3/8] Update loader.js --- src/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader.js b/src/loader.js index a4373b0..8e8517d 100644 --- a/src/loader.js +++ b/src/loader.js @@ -43,7 +43,7 @@ export function loadGooglePlacesLibrary(apiKey, callback) { const element = document.createElement('script') element.async = true element.defer = true - element.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&libraries=places&callback=onLibraryLoaded` + element.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&libraries=places&loading=async&callback=Function.prototype` element.type = 'text/javascript' window.onLibraryLoaded = onLibraryLoaded From 7c531ed08b39972452ed0acaf60594fee6012502 Mon Sep 17 00:00:00 2001 From: Michael Wilson <70765247+hobbitronics@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:06:38 -0500 Subject: [PATCH 4/8] remove global --- src/loader.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/loader.js b/src/loader.js index 8e8517d..2ec081c 100644 --- a/src/loader.js +++ b/src/loader.js @@ -45,7 +45,6 @@ export function loadGooglePlacesLibrary(apiKey, callback) { element.defer = true element.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&libraries=places&loading=async&callback=Function.prototype` element.type = 'text/javascript' - window.onLibraryLoaded = onLibraryLoaded document.head.appendChild(element) } From 7e47e5a0de46a76a644c45d6912ce5de6d2724a3 Mon Sep 17 00:00:00 2001 From: Michael Wilson <70765247+hobbitronics@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:12:28 -0500 Subject: [PATCH 5/8] re-add line --- src/loader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/loader.js b/src/loader.js index 2ec081c..45a07b7 100644 --- a/src/loader.js +++ b/src/loader.js @@ -43,6 +43,7 @@ export function loadGooglePlacesLibrary(apiKey, callback) { const element = document.createElement('script') element.async = true element.defer = true + element.onload = onLibraryLoaded element.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&libraries=places&loading=async&callback=Function.prototype` element.type = 'text/javascript' From 8bc5e27fc325ef64d2ea5db528f037fe40c94f1f Mon Sep 17 00:00:00 2001 From: forevermatt Date: Wed, 6 Mar 2024 16:26:52 -0500 Subject: [PATCH 6/8] Avoid adding `&loading=async` for now At the moment, we are using the script tag's "load" event, so I don't think we can set this to `async` yet. Per the docs: `loading`: ... Set to async to indicate that ... no JavaScript code is triggered by the script's load event. --- src/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader.js b/src/loader.js index 45a07b7..c053134 100644 --- a/src/loader.js +++ b/src/loader.js @@ -44,7 +44,7 @@ export function loadGooglePlacesLibrary(apiKey, callback) { element.async = true element.defer = true element.onload = onLibraryLoaded - element.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&libraries=places&loading=async&callback=Function.prototype` + element.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&libraries=places&callback=Function.prototype` element.type = 'text/javascript' document.head.appendChild(element) From 94132f3524c7e0838922039b31ff7f04cce8ccc0 Mon Sep 17 00:00:00 2001 From: Matt H Date: Wed, 6 Mar 2024 16:33:30 -0500 Subject: [PATCH 7/8] Bump version number for release --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba0dedd..c7f7c40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@silintl/svelte-google-places-autocomplete", - "version": "1.1.6", + "version": "1.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@silintl/svelte-google-places-autocomplete", - "version": "1.1.6", + "version": "1.2.2", "license": "MIT", "devDependencies": { "@rollup/plugin-node-resolve": "^6.0.0", diff --git a/package.json b/package.json index c15d000..b946104 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@silintl/svelte-google-places-autocomplete", - "version": "1.2.0", + "version": "1.2.2", "description": "A minimal port of the [Google Places Autocomplete API](https://developers.google.com/maps/documentation/javascript/places-autocomplete) as a Svelte component.", "repository": { "type": "git", From 9ba8dfe391e3a7db0ca4f25532245db6fcef2d34 Mon Sep 17 00:00:00 2001 From: Matt H Date: Wed, 6 Mar 2024 16:34:16 -0500 Subject: [PATCH 8/8] Update release steps in pull request template --- .github/pull_request_template.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index b133938..286cb72 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,4 +20,10 @@ ### Release PR Checklist - [ ] Update version number in package.json -- [ ] After merge, publish to npmjs.com +- [ ] Run `make install` to update version number in package-lock.json +- [ ] Make sure everything looks good in a DRY RUN of publishing this to npm: `npm publish --dry-run` + +After merge... +- [ ] Tag that commit on `master` +- [ ] Check out that commit +- [ ] Publish that version to NPM: `npm publish --access public` \ No newline at end of file