From 07c847297dce40e874f6ba315f6e949f3097c418 Mon Sep 17 00:00:00 2001 From: Jack Baron Date: Mon, 26 Feb 2024 18:44:06 +0000 Subject: [PATCH] unpin react since it is always stable i hope --- src/esm.d.ts | 8 ++++---- src/react/context.ts | 2 +- src/react/hooks/entities.ts | 2 +- src/react/hooks/events.ts | 2 +- src/react/hooks/inputs.ts | 2 +- src/react/hooks/network.ts | 2 +- src/react/hooks/useForceUpdate.ts | 2 +- src/react/hooks/useGame.ts | 2 +- src/react/hooks/usePlayer.ts | 2 +- src/react/hooks/useTransform.ts | 6 +----- src/react/render.tsx | 6 +++--- tsconfig.json | 2 +- 12 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/esm.d.ts b/src/esm.d.ts index f8679f7..53a0578 100644 --- a/src/esm.d.ts +++ b/src/esm.d.ts @@ -1,19 +1,19 @@ // define types for HTTP imports -declare module 'https://esm.sh/v136/react@18.2.0' { +declare module 'https://esm.sh/react@18.2.0' { import React from 'react' export = React } -declare module 'https://esm.sh/v136/react@18.2.0/jsx-runtime' { +declare module 'https://esm.sh/react@18.2.0/jsx-runtime' { export * from 'react/jsx-runtime' } -declare module 'https://esm.sh/v136/react@18.2.0/jsx-dev-runtime' { +declare module 'https://esm.sh/react@18.2.0/jsx-dev-runtime' { export * from 'react/jsx-dev-runtime' } -declare module 'https://esm.sh/v136/react-dom@18.2.0/client' { +declare module 'https://esm.sh/react-dom@18.2.0/client' { export * from 'react-dom/client' } diff --git a/src/react/context.ts b/src/react/context.ts index a151690..b6d5ded 100644 --- a/src/react/context.ts +++ b/src/react/context.ts @@ -1,4 +1,4 @@ import type { Game } from '@dreamlab.gg/core' -import { createContext } from 'https://esm.sh/v136/react@18.2.0' +import { createContext } from 'https://esm.sh/react@18.2.0' export const GameContext = createContext | null>(null) diff --git a/src/react/hooks/entities.ts b/src/react/hooks/entities.ts index b3feae5..a6933c1 100644 --- a/src/react/hooks/entities.ts +++ b/src/react/hooks/entities.ts @@ -1,7 +1,7 @@ import { isSpawnableEntity } from '@dreamlab.gg/core' import type { Entity, Game, SpawnableEntity } from '@dreamlab.gg/core' import type { EventHandler } from '@dreamlab.gg/core/events' -import { useCallback, useEffect } from 'https://esm.sh/v136/react@18.2.0' +import { useCallback, useEffect } from 'https://esm.sh/react@18.2.0' import { useForceUpdate } from './useForceUpdate.ts' import { useGame } from './useGame.ts' diff --git a/src/react/hooks/events.ts b/src/react/hooks/events.ts index 49aae3d..39983a5 100644 --- a/src/react/hooks/events.ts +++ b/src/react/hooks/events.ts @@ -5,7 +5,7 @@ import type { EventEmitter, EventHandler, } from '@dreamlab.gg/core/events' -import { useEffect } from 'https://esm.sh/v136/react@18.2.0' +import { useEffect } from 'https://esm.sh/react@18.2.0' import { useGame } from './useGame.ts' export const useEventListener = < diff --git a/src/react/hooks/inputs.ts b/src/react/hooks/inputs.ts index 9cbce55..5a47ef3 100644 --- a/src/react/hooks/inputs.ts +++ b/src/react/hooks/inputs.ts @@ -1,5 +1,5 @@ import type { InputCode, InputManager } from '@dreamlab.gg/core/input' -import { useCallback, useEffect } from 'https://esm.sh/v136/react@18.2.0' +import { useCallback, useEffect } from 'https://esm.sh/react@18.2.0' import type { LiteralUnion } from 'type-fest' import { useForceUpdate } from './useForceUpdate.ts' import { useGame } from './useGame.ts' diff --git a/src/react/hooks/network.ts b/src/react/hooks/network.ts index 6558f4a..272cfcd 100644 --- a/src/react/hooks/network.ts +++ b/src/react/hooks/network.ts @@ -2,7 +2,7 @@ import type { MessageListenerClient, NetClient, } from '@dreamlab.gg/core/network' -import { useEffect, useMemo } from 'https://esm.sh/v136/react@18.2.0' +import { useEffect, useMemo } from 'https://esm.sh/react@18.2.0' import { useGame } from './useGame.ts' /** diff --git a/src/react/hooks/useForceUpdate.ts b/src/react/hooks/useForceUpdate.ts index 600e7bc..53ddb4a 100644 --- a/src/react/hooks/useForceUpdate.ts +++ b/src/react/hooks/useForceUpdate.ts @@ -1,4 +1,4 @@ -import { useCallback, useState } from 'https://esm.sh/v136/react@18.2.0' +import { useCallback, useState } from 'https://esm.sh/react@18.2.0' /** * Allows you to force a re-render diff --git a/src/react/hooks/useGame.ts b/src/react/hooks/useGame.ts index d7285ef..046ae42 100644 --- a/src/react/hooks/useGame.ts +++ b/src/react/hooks/useGame.ts @@ -1,5 +1,5 @@ import type { Game } from '@dreamlab.gg/core' -import { useContext } from 'https://esm.sh/v136/react@18.2.0' +import { useContext } from 'https://esm.sh/react@18.2.0' import { GameContext } from '~/react/context.ts' /** diff --git a/src/react/hooks/usePlayer.ts b/src/react/hooks/usePlayer.ts index 595ded9..3e4198a 100644 --- a/src/react/hooks/usePlayer.ts +++ b/src/react/hooks/usePlayer.ts @@ -1,7 +1,7 @@ import { isPlayer } from '@dreamlab.gg/core/entities' import type { Player } from '@dreamlab.gg/core/entities' import type { EventHandler } from '@dreamlab.gg/core/events' -import { useCallback, useEffect } from 'https://esm.sh/v136/react@18.2.0' +import { useCallback, useEffect } from 'https://esm.sh/react@18.2.0' import { useForceUpdate } from './useForceUpdate.ts' import { useGame } from './useGame.ts' diff --git a/src/react/hooks/useTransform.ts b/src/react/hooks/useTransform.ts index f479d40..8f5b093 100644 --- a/src/react/hooks/useTransform.ts +++ b/src/react/hooks/useTransform.ts @@ -5,11 +5,7 @@ import type { Transform, ZIndexListener, } from '@dreamlab.gg/core/math' -import { - useCallback, - useEffect, - useState, -} from 'https://esm.sh/v136/react@18.2.0' +import { useCallback, useEffect, useState } from 'https://esm.sh/react@18.2.0' /** * Return a reference to a {@link Transform} that will automatically trigger React re-renders diff --git a/src/react/render.tsx b/src/react/render.tsx index 696cc9d..63e0d2b 100644 --- a/src/react/render.tsx +++ b/src/react/render.tsx @@ -1,7 +1,7 @@ import type { Game } from '@dreamlab.gg/core' -import { createRoot } from 'https://esm.sh/v136/react-dom@18.2.0/client' -import { StrictMode } from 'https://esm.sh/v136/react@18.2.0' -import type { ReactNode } from 'https://esm.sh/v136/react@18.2.0' +import { createRoot } from 'https://esm.sh/react-dom@18.2.0/client' +import { StrictMode } from 'https://esm.sh/react@18.2.0' +import type { ReactNode } from 'https://esm.sh/react@18.2.0' import { GameContext } from '~/react/context.ts' interface RenderOptions { diff --git a/tsconfig.json b/tsconfig.json index 5cffbbe..3183c3f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -44,7 +44,7 @@ // React "jsx": "react-jsx", - "jsxImportSource": "https://esm.sh/v136/react@18.2.0", + "jsxImportSource": "https://esm.sh/react@18.2.0", "baseUrl": ".", "paths": {