Skip to content

Commit

Permalink
pin esm.sh version
Browse files Browse the repository at this point in the history
  • Loading branch information
luludotdev committed Nov 30, 2023
1 parent bccea6f commit d82c358
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/esm.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// define types for HTTP imports

declare module 'https://esm.sh/[email protected]' {
declare module 'https://esm.sh/v136/[email protected]' {
import React from 'react'

export = React
}

declare module 'https://esm.sh/[email protected]/jsx-runtime' {
declare module 'https://esm.sh/v136/[email protected]/jsx-runtime' {
export * from 'react/jsx-runtime'
}

declare module 'https://esm.sh/[email protected]/jsx-dev-runtime' {
declare module 'https://esm.sh/v136/[email protected]/jsx-dev-runtime' {
export * from 'react/jsx-dev-runtime'
}

declare module 'https://esm.sh/[email protected]/client' {
declare module 'https://esm.sh/v136/[email protected]/client' {
export * from 'react-dom/client'
}
2 changes: 1 addition & 1 deletion src/react/context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Game } from '@dreamlab.gg/core'
import { createContext } from 'https://esm.sh/[email protected]'
import { createContext } from 'https://esm.sh/v136/[email protected]'

export const GameContext = createContext<Game<false> | null>(null)
2 changes: 1 addition & 1 deletion src/react/hooks/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
SpawnableEntity,
} from '@dreamlab.gg/core'
import type { EventHandler } from '@dreamlab.gg/core/events'
import { useCallback, useEffect } from 'https://esm.sh/[email protected]'
import { useCallback, useEffect } from 'https://esm.sh/v136/[email protected]'
import { useForceUpdate } from './useForceUpdate.ts'
import { useGame } from './useGame.ts'

Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
Event,
EventHandler,
} from '@dreamlab.gg/core/events'
import { useEffect } from 'https://esm.sh/[email protected]'
import { useEffect } from 'https://esm.sh/v136/[email protected]'
import { useGame } from './useGame.ts'

export const useClientEventListener = <T extends Event<ClientEvents>>(
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/inputs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { InputCode, InputManager } from '@dreamlab.gg/core/input'
import { useCallback, useEffect } from 'https://esm.sh/[email protected]'
import { useCallback, useEffect } from 'https://esm.sh/v136/[email protected]'
import type { LiteralUnion } from 'type-fest'
import { useForceUpdate } from './useForceUpdate.ts'
import { useGame } from './useGame.ts'
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {
MessageListenerClient,
NetClient,
} from '@dreamlab.gg/core/network'
import { useEffect, useMemo } from 'https://esm.sh/[email protected]'
import { useEffect, useMemo } from 'https://esm.sh/v136/[email protected]'
import { useGame } from './useGame.ts'

/**
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/useForceUpdate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useCallback, useState } from 'https://esm.sh/[email protected]'
import { useCallback, useState } from 'https://esm.sh/v136/[email protected]'

/**
* Allows you to force a re-render
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/useGame.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Game } from '@dreamlab.gg/core'
import { useContext } from 'https://esm.sh/[email protected]'
import { useContext } from 'https://esm.sh/v136/[email protected]'
import { GameContext } from '~/react/context.ts'

/**
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/usePlayer.ts
Original file line number Diff line number Diff line change
@@ -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/[email protected]'
import { useCallback, useEffect } from 'https://esm.sh/v136/[email protected]'
import { useForceUpdate } from './useForceUpdate.ts'
import { useGame } from './useGame.ts'

Expand Down
6 changes: 3 additions & 3 deletions src/react/render.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Game } from '@dreamlab.gg/core'
import { createRoot } from 'https://esm.sh/[email protected]/client'
import { StrictMode } from 'https://esm.sh/[email protected]'
import type { ReactNode } from 'https://esm.sh/[email protected]'
import { createRoot } from 'https://esm.sh/v136/[email protected]/client'
import { StrictMode } from 'https://esm.sh/v136/[email protected]'
import type { ReactNode } from 'https://esm.sh/v136/[email protected]'
import { GameContext } from '~/react/context.ts'

interface RenderOptions {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

// React
"jsx": "react-jsx",
"jsxImportSource": "https://esm.sh/[email protected]",
"jsxImportSource": "https://esm.sh/v136/[email protected]",

"baseUrl": ".",
"paths": {
Expand Down

0 comments on commit d82c358

Please sign in to comment.