Skip to content

Commit

Permalink
updated dependencies, improved build, prepared for release
Browse files Browse the repository at this point in the history
  • Loading branch information
JustFly1984 committed Feb 11, 2024
1 parent e2c97ab commit 2b404da
Show file tree
Hide file tree
Showing 14 changed files with 4,843 additions and 2,423 deletions.
142 changes: 71 additions & 71 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,114 +45,114 @@
]
},
"resolutions": {
"@babel/core": "7.22.9",
"@types/jest": "29.5.3",
"@types/node": "20.4.5",
"@types/react": "18.2.16",
"@types/react-dom": "18.2.7",
"@typescript-eslint/parser": "6.2.0",
"@typescript-eslint/eslint-plugin": "6.2.0"
"@babel/core": "7.23.9",
"@types/jest": "29.5.12",
"@types/node": "20.11.17",
"@types/react": "18.2.55",
"@types/react-dom": "18.2.19",
"@typescript-eslint/parser": "6.21.0",
"@typescript-eslint/eslint-plugin": "6.21.0"
},
"devDependencies": {
"@babel/core": "7.22.9",
"@babel/core": "7.23.9",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.22.7",
"@babel/plugin-proposal-export-default-from": "7.22.5",
"@babel/plugin-proposal-decorators": "7.23.9",
"@babel/plugin-proposal-export-default-from": "7.23.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/plugin-proposal-optional-chaining": "7.21.0",
"@babel/plugin-proposal-private-methods": "7.18.6",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-jsx": "7.22.5",
"@babel/plugin-syntax-typescript": "7.22.5",
"@babel/plugin-transform-arrow-functions": "7.22.5",
"@babel/plugin-transform-classes": "7.22.6",
"@babel/plugin-transform-destructuring": "7.22.5",
"@babel/plugin-transform-for-of": "7.22.5",
"@babel/plugin-transform-parameters": "7.22.5",
"@babel/plugin-transform-react-jsx": "7.22.5",
"@babel/plugin-transform-spread": "7.22.5",
"@babel/plugin-transform-typescript": "7.22.9",
"@babel/preset-env": "7.22.9",
"@babel/preset-react": "7.22.5",
"@babel/preset-typescript": "7.22.5",
"@babel/plugin-syntax-jsx": "7.23.3",
"@babel/plugin-syntax-typescript": "7.23.3",
"@babel/plugin-transform-arrow-functions": "7.23.3",
"@babel/plugin-transform-classes": "7.23.8",
"@babel/plugin-transform-destructuring": "7.23.3",
"@babel/plugin-transform-for-of": "7.23.6",
"@babel/plugin-transform-parameters": "7.23.3",
"@babel/plugin-transform-react-jsx": "7.23.4",
"@babel/plugin-transform-spread": "7.23.3",
"@babel/plugin-transform-typescript": "7.23.3",
"@babel/preset-env": "7.23.9",
"@babel/preset-react": "7.23.3",
"@babel/preset-typescript": "7.23.3",
"@googlemaps/react-wrapper": "1.1.35",
"@jest/types": "29.6.1",
"@jest/types": "29.6.3",
"@mdx-js/loader": "1.6.22",
"@storybook/addon-actions": "7.1.1",
"@storybook/addon-essentials": "7.1.1",
"@storybook/addon-links": "7.1.1",
"@storybook/builder-webpack5": "7.1.1",
"@storybook/addon-actions": "7.6.14",
"@storybook/addon-essentials": "7.6.14",
"@storybook/addon-links": "7.6.14",
"@storybook/builder-webpack5": "7.6.14",
"@storybook/manager-webpack5": "6.5.16",
"@storybook/react": "7.1.1",
"@svgr/webpack": "8.0.1",
"@testing-library/dom": "9.3.1",
"@types/google.maps": "3.53.5",
"@types/invariant": "2.2.35",
"@types/jest": "29.5.3",
"@types/node": "20.4.5",
"@types/react": "18.2.16",
"@types/react-dom": "18.2.7",
"@types/supercluster": "7.1.0",
"@typescript-eslint/parser": "6.2.0",
"@typescript-eslint/eslint-plugin": "6.2.0",
"@svgr/webpack": "8.1.0",
"@testing-library/dom": "9.3.4",
"@types/google.maps": "3.55.2",
"@types/invariant": "2.2.37",
"@types/jest": "29.5.12",
"@types/node": "20.11.17",
"@types/react": "18.2.55",
"@types/react-dom": "18.2.19",
"@types/supercluster": "7.1.3",
"@typescript-eslint/parser": "6.21.0",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript/lib-dom": "npm:@types/web",
"acorn": "8.10.0",
"acorn": "8.11.3",
"acorn-jsx": "5.3.2",
"autoprefixer": "10.4.14",
"autoprefixer": "10.4.17",
"babel-loader": "9.1.3",
"babel-plugin-macros": "3.1.0",
"babel-plugin-polyfill-corejs3": "0.8.3",
"babel-plugin-react-require": "4.0.1",
"babel-plugin-polyfill-corejs3": "0.9.0",
"babel-plugin-react-require": "4.0.2",
"css-module-builder": "2.0.6",
"eslint": "8.45.0",
"eslint-config-prettier": "8.8.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-standard": "17.1.0",
"eslint-import-resolver-typescript": "3.5.5",
"eslint-import-resolver-webpack": "0.13.2",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-import-resolver-webpack": "0.13.8",
"eslint-plugin-ascii": "1.0.0",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-compat": "4.1.4",
"eslint-plugin-css-modules": "2.11.0",
"eslint-plugin-compat": "4.2.0",
"eslint-plugin-css-modules": "2.12.0",
"eslint-plugin-filenames": "1.3.2",
"eslint-plugin-html": "7.1.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.2.3",
"eslint-plugin-jest-dom": "5.0.1",
"eslint-plugin-html": "8.0.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jest": "27.6.3",
"eslint-plugin-jest-dom": "5.1.0",
"eslint-plugin-json": "3.1.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-n": "16.0.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-n": "16.6.2",
"eslint-plugin-no-inferred-method-name": "2.0.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-optimize-regex": "1.2.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-promiseparams": "1.0.8",
"eslint-plugin-react": "7.33.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-perf": "3.3.1",
"eslint-plugin-security-node": "1.1.1",
"eslint-plugin-you-dont-need-lodash-underscore": "6.12.0",
"fork-ts-checker-webpack-plugin": "8.0.0",
"eslint-plugin-react-perf": "3.3.2",
"eslint-plugin-security-node": "1.1.4",
"eslint-plugin-you-dont-need-lodash-underscore": "6.13.0",
"fork-ts-checker-webpack-plugin": "9.0.2",
"husky": "8.0.3",
"jest": "29.6.1",
"jest-environment-jsdom": "29.6.1",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-specific-snapshot": "8.0.0",
"lerna": "7.1.4",
"lint-staged": "13.2.3",
"postcss": "8.4.27",
"lerna": "8.1.2",
"lint-staged": "15.2.2",
"postcss": "8.4.35",
"postcss-flexbugs-fixes": "5.0.2",
"prettier": "3.0.0",
"prettier": "3.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"require-from-string": "2.0.2",
"sass-loader": "13.3.2",
"sass-loader": "14.1.0",
"source-map-explorer": "2.5.3",
"ts-jest": "29.1.1",
"ts-jest": "29.1.2",
"tsconfig-paths-webpack-plugin": "4.1.0",
"typescript": "5.1.6",
"typescript": "5.3.3",
"url-loader": "4.1.1",
"webpack": "5.88.2"
"webpack": "5.90.1"
},
"husky": {
"hooks": {
Expand Down
2 changes: 2 additions & 0 deletions packages/react-google-maps-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## 2.19.3 fixes to MarkerF functionality by Fabian Scherer

## 2.19.2 fix @react-google-maps/infobox boxStyle type

## 2.19.0 fix to MarkerF animation, update [email protected]
Expand Down
29 changes: 17 additions & 12 deletions packages/react-google-maps-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,33 +84,38 @@
"pub:next": "yarn publish . --tag next",
"prepublishOnly": "yarn build"
},
"resolutions": {
"@types/node": "20.11.17",
"@types/react": "18.2.55",
"@types/react-dom": "18.2.19"
},
"dependencies": {
"@googlemaps/js-api-loader": "1.16.2",
"@googlemaps/markerclusterer": "2.3.2",
"@googlemaps/markerclusterer": "2.5.3",
"@react-google-maps/infobox": "2.19.2",
"@react-google-maps/marker-clusterer": "2.19.2",
"@types/google.maps": "3.53.5",
"@types/google.maps": "3.55.2",
"invariant": "2.2.4"
},
"peerDependencies": {
"react": "^16.8 || ^17 || ^18",
"react-dom": "^16.8 || ^17 || ^18"
},
"devDependencies": {
"@rollup/plugin-commonjs": "25.0.3",
"@rollup/plugin-node-resolve": "15.1.0",
"@rollup/plugin-typescript": "11.1.2",
"@testing-library/react": "14.0.0",
"jest": "29.6.1",
"jest-cli": "29.6.1",
"react-docgen": "6.0.2",
"@rollup/plugin-commonjs": "25.0.7",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-typescript": "11.1.6",
"@testing-library/react": "14.2.1",
"jest": "29.7.0",
"jest-cli": "29.7.0",
"react-docgen": "7.0.3",
"react-docgen-typescript": "2.2.2",
"react-styleguidist": "13.1.1",
"rimraf": "5.0.1",
"react-styleguidist": "13.1.2",
"rimraf": "5.0.5",
"rollup": "2.78.1",
"rollup-plugin-dts": "5.3.0",
"rollup-plugin-terser": "7.0.2",
"ts-loader": "9.4.4"
"ts-loader": "9.5.1"
},
"gitHead": "80167ddcc3d8e356dbf0b0c3a6292c6a3a989f83"
}
4 changes: 3 additions & 1 deletion packages/react-google-maps-api/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ const output = (format) => {

export default [
{
plugins: [typescript(), nodeResolve(), commonjs()],
plugins: [typescript({
exclude: ["**/*.test.ts", "**/*.stories.tsx"]
}), nodeResolve(), commonjs()],
external: ['react', 'react-dom', 'react/jsx-runtime'],

input: 'src/index.ts',
Expand Down
16 changes: 12 additions & 4 deletions packages/react-google-maps-api/src/GoogleMap.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { ComponentStory, ComponentMeta } from '@storybook/react'
// eslint-disable-next-line node/no-extraneous-import
import type { StoryFn, Meta } from '@storybook/react'
import { GoogleMap } from '.'

export default {
const exp: Meta<typeof GoogleMap> = {
title: 'Example/GoogleMap',
component: GoogleMap,
args: {
Expand All @@ -15,16 +16,23 @@ export default {
lng: -38.523,
},
},
} as ComponentMeta<typeof GoogleMap>
}

export default exp

const Template: ComponentStory<typeof GoogleMap> = (args) => (
const Template: StoryFn<typeof GoogleMap> = (args) => (
<GoogleMap {...args} />
)

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
export const Default = Template.bind({})
Default.args = {
zoom: 8,
}

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
export const Satellite = Template.bind({})
Satellite.args = {
zoom: 15,
Expand Down
24 changes: 11 additions & 13 deletions packages/react-google-maps-api/src/GoogleMap.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type CSSProperties, PureComponent, type ReactNode, useState, useRef, useEffect, memo } from 'react'
import { type CSSProperties, PureComponent, type JSX, type ReactNode, useState, useRef, useEffect, memo } from 'react'

import MapContext from './map-context'

Expand Down Expand Up @@ -362,23 +362,21 @@ function GoogleMapFunctional({
if (onUnmount) {
onUnmount(map)
}


}
}
}, [])

return (
<div
id={id}
ref={ref}
style={mapContainerStyle}
className={mapContainerClassName}
>
<MapContext.Provider value={map}>
{map !== null ? children : <></>}
</MapContext.Provider>
</div>
id={id}
ref={ref}
style={mapContainerStyle}
className={mapContainerClassName}
>
<MapContext.Provider value={map}>
{map !== null ? children : null}
</MapContext.Provider>
</div>
)
}

Expand Down Expand Up @@ -471,7 +469,7 @@ export class GoogleMap extends PureComponent<GoogleMapProps, GoogleMapState> {
className={this.props.mapContainerClassName}
>
<MapContext.Provider value={this.state.map}>
{this.state.map !== null ? this.props.children : <></>}
{this.state.map !== null ? this.props.children : null}
</MapContext.Provider>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/react-google-maps-api/src/LoadScriptNext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { memo, ReactElement, useEffect } from 'react'
import { memo, ReactElement, useEffect, type JSX } from 'react'

import { DefaultLoadingElement } from './LoadScript'
import { useLoadScript, UseLoadScriptOptions } from './useLoadScript'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @jest-environment jsdom
*/
import type { JSX } from 'react'

import { render, cleanup } from "@testing-library/react"
import GoogleMap from "../../GoogleMap"
Expand All @@ -17,7 +18,7 @@ function onCircleLoad(circle: google.maps.Circle) {
instance = circle
}

function getCircle(props: CircleProps) {
function getCircle(props: CircleProps): JSX.Element {
return <GoogleMap><Circle {...props} /></GoogleMap>
}

Expand Down
Loading

0 comments on commit 2b404da

Please sign in to comment.