Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/ban-types": 1,
"@typescript-eslint/no-empty-function": 1,
"@typescript-eslint/member-ordering": 1,
"@typescript-eslint/explicit-member-accessibility": [
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -82,4 +82,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
1 change: 1 addition & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ permissions:
jobs:
test:
uses: ./.github/workflows/test.yml

dependabot:
needs: test
runs-on: ubuntu-latest
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,26 @@ on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: npm
- name: Install Dependencies
run: npm ci
- name: Build Documentation
run: npm run docs
- if: github.ref == 'refs/heads/main'
name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
user_name: 'googlemaps-bot'
user_email: 'googlemaps-bot@users.noreply.github.com'
user_name: "googlemaps-bot"
user_email: "googlemaps-bot@users.noreply.github.com"
commit_message: ${{ github.event.head_commit.message }}
14 changes: 6 additions & 8 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,25 @@ jobs:
steps:
- id: release
name: Release Please
uses: google-github-actions/release-please-action@v3
uses: googleapis/release-please-action@v4

with:
release-type: node
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
package-name: "@googlemaps/react-wrapper"
bump-minor-pre-major: true

# Everything below is for NPM publishing when a release is cut.
# Note the "if" statement on all commands to make sure that publishing
# only happens when a release is cut.

- if: ${{ steps.release.outputs.release_created }}
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- if: ${{ steps.release.outputs.release_created }}
name: Setup Node for Dependency Installation
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: npm

- if: ${{ steps.release.outputs.release_created }}
Expand All @@ -62,9 +60,9 @@ jobs:
# Now configure node with the registry used for publishing
- if: ${{ steps.release.outputs.release_created }}
name: Setup Node for Publishing
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: "https://wombat-dressing-room.appspot.com/"

- if: ${{ steps.release.outputs.release_created }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@

name: Test
on: [push, pull_request, workflow_call]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: npm
- name: Install Dependencies
run: npm ci
Expand Down
9 changes: 6 additions & 3 deletions examples/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
* limitations under the License.
*/
import React, { useEffect, useRef, ReactElement } from "react";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";

import { Wrapper, Status } from "../src";

const render = (status: Status): ReactElement => {
Expand All @@ -30,7 +31,7 @@ function MyMapComponent({
center: google.maps.LatLngLiteral;
zoom: number;
}) {
const ref = useRef();
const ref = useRef(null);

useEffect(() => {
new window.google.maps.Map(ref.current, {
Expand All @@ -53,4 +54,6 @@ function App() {
);
}

ReactDOM.render(<App />, document.querySelector("#root"));
const container = document.getElementById("root") as HTMLElement;
const root = createRoot(container);
root.render(<App />);
Loading