Skip to content

Commit

Permalink
chore: fix internal ESM imports
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS committed Nov 28, 2023
1 parent e1cda1f commit b79f52b
Show file tree
Hide file tree
Showing 33 changed files with 116 additions and 98 deletions.
18 changes: 18 additions & 0 deletions .changeset/sour-melons-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@typed/async-data": patch
"@typed/context": patch
"@typed/dom": patch
"@typed/environment": patch
"@typed/fx": patch
"@typed/id": patch
"@typed/navigation": patch
"@typed/path": patch
"@typed/route": patch
"@typed/router": patch
"@typed/template": patch
"@typed/tsconfig": patch
"@typed/ui": patch
"@typed/wire": patch
---

Fix internal ESM imports
2 changes: 1 addition & 1 deletion packages/async-data/src/internal/async-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Cause, Effect, Effectable, Equal, Hash, Option, pipe, Unify } from "effect"
import { constant } from "effect/Function"
import { type AsyncData, type Failure, type Loading, type Success } from "../AsyncData"
import { type AsyncData, type Failure, type Loading, type Success } from "../AsyncData.js"
import { FAILURE_TAG, LOADING_TAG, NO_DATA_TAG, SUCCESS_TAG } from "./tag.js"

export class FailureImpl<E> extends Effectable.Class<never, E, never> implements Failure<E> {
Expand Down
16 changes: 8 additions & 8 deletions packages/fx/src/internal/core-ref-subject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import { sum } from "effect/Number"
import * as Option from "effect/Option"
import { getEquivalence } from "effect/ReadonlyArray"
import type * as Scope from "effect/Scope"
import { Computed } from "../Computed"
import { Filtered } from "../Filtered"
import type { Fx, FxInput } from "../Fx"
import { type RefSubject } from "../RefSubject"
import { Sink, WithContext } from "../Sink"
import type * as Subject from "../Subject"
import { ComputedTypeId, RefSubjectTypeId } from "../TypeId"
import { transformFx } from "../Versioned"
import { Computed } from "../Computed.js"
import { Filtered } from "../Filtered.js"
import type { Fx, FxInput } from "../Fx.js"
import { type RefSubject } from "../RefSubject.js"
import { Sink, WithContext } from "../Sink.js"
import type * as Subject from "../Subject.js"
import { ComputedTypeId, RefSubjectTypeId } from "../TypeId.js"
import { transformFx } from "../Versioned.js"
import { makeHoldSubject } from "./core-subject.js"
import * as core from "./core.js"
import { DeferredRef } from "./deferred-ref.js"
Expand Down
6 changes: 3 additions & 3 deletions packages/fx/src/internal/core-subject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import * as Exit from "effect/Exit"
import * as MutableRef from "effect/MutableRef"
import * as Option from "effect/Option"
import * as Scope from "effect/Scope"
import type { Fx } from "../Fx"
import type { Sink } from "../Sink"
import type { Subject } from "../Subject"
import type { Fx } from "../Fx.js"
import type { Sink } from "../Sink.js"
import type { Subject } from "../Subject.js"
import { fromSink } from "./core.js"
import { ToFx } from "./fx-primitive.js"
import { RingBuffer } from "./helpers.js"
Expand Down
6 changes: 3 additions & 3 deletions packages/fx/src/internal/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { compileSyncReducer, Filter, FilterMap, Map } from "./sync-operator.js"
import type { DurationInput } from "effect/Duration"
import type { Equivalence } from "effect/Equivalence"
import type { Runtime } from "effect/Runtime"
import * as Emitter from "../Emitter"
import * as Emitter from "../Emitter.js"
import type {
FlattenStrategy,
Fx,
Expand All @@ -45,8 +45,8 @@ import type {
WithEarlyExitParams,
WithFlattenStrategyParams,
WithScopedForkParams
} from "../Fx"
import * as Sink from "../Sink"
} from "../Fx.js"
import * as Sink from "../Sink.js"
import { type Bounds, boundsFrom, mergeBounds } from "./bounds.js"
import { type InternalEffect, matchEffectPrimitive } from "./effect-primitive.js"
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/fx/src/internal/effect-operator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Cause from "effect/Cause"
import * as Effect from "effect/Effect"
import * as Option from "effect/Option"
import { WithContext } from "../Sink"
import { WithContext } from "../Sink.js"
import type { SyncOperator } from "./sync-operator.js"

// Effect operators are a subset of operators which can be safely fused together assynchronously
Expand Down
4 changes: 2 additions & 2 deletions packages/fx/src/internal/fx-effect-proto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Effect from "effect/Effect"
import type { Fx } from "../Fx"
import type { Versioned } from "../Versioned"
import type { Fx } from "../Fx.js"
import type { Versioned } from "../Versioned.js"
import { succeed } from "./core.js"
import { FxEffectBase } from "./protos.js"

Expand Down
4 changes: 2 additions & 2 deletions packages/fx/src/internal/fx-primitive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import type * as Cause from "effect/Cause"
import type * as Effect from "effect/Effect"
import type * as Scope from "effect/Scope"

import type * as Sink from "../Sink"
import type * as Sink from "../Sink.js"
import { type EffectOperator, fuseEffectOperators, liftSyncOperator } from "./effect-operator.js"
import * as syncOperator from "./sync-operator.js"

import type { FlattenStrategy, Fx, FxFork, WithEarlyExitParams, WithScopedForkParams } from "../Fx"
import type { FlattenStrategy, Fx, FxFork, WithEarlyExitParams, WithScopedForkParams } from "../Fx.js"
import { FxProto } from "./protos.js"

export type Primitive =
Expand Down
6 changes: 3 additions & 3 deletions packages/fx/src/internal/fx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import type * as Request from "effect/Request"
import type { Scheduler } from "effect/Scheduler"
import type * as Scope from "effect/Scope"
import * as Tracer from "effect/Tracer"
import type { Fx, FxInput } from "../Fx"
import * as Sink from "../Sink"
import * as Typeclass from "../Typeclass"
import type { Fx, FxInput } from "../Fx.js"
import * as Sink from "../Sink.js"
import * as Typeclass from "../Typeclass.js"
import * as core from "./core.js"
import { run } from "./run.js"
import { multicast } from "./share.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/fx/src/internal/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import * as Ref from "effect/Ref"
import * as Runtime from "effect/Runtime"
import * as Scope from "effect/Scope"
import * as SynchronizedRef from "effect/SynchronizedRef"
import type { FlattenStrategy, FxFork, ScopedFork } from "../Fx"
import type * as Sink from "../Sink"
import type { FlattenStrategy, FxFork, ScopedFork } from "../Fx.js"
import type * as Sink from "../Sink.js"
import type { InternalEffect } from "./effect-primitive.js"
import { matchEffectPrimitive } from "./effect-primitive.js"

Expand Down
8 changes: 4 additions & 4 deletions packages/fx/src/internal/keyed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import * as MutableHashMap from "effect/MutableHashMap"
import * as Option from "effect/Option"
import * as ReadonlyArray from "effect/ReadonlyArray"
import * as Scope from "effect/Scope"
import type * as Fx from "../Fx"
import { fromEffect, type RefSubject } from "../RefSubject"
import { WithContext } from "../Sink"
import type { Subject } from "../Subject"
import type * as Fx from "../Fx.js"
import { fromEffect, type RefSubject } from "../RefSubject.js"
import { WithContext } from "../Sink.js"
import type { Subject } from "../Subject.js"
import { makeHoldSubject } from "./core-subject.js"
import { from, skipRepeatsWith, withScopedFork } from "./core.js"
import { adjustTime } from "./helpers.js"
Expand Down
8 changes: 4 additions & 4 deletions packages/fx/src/internal/matchers.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as Cause from "effect/Cause"
import * as Effect from "effect/Effect"
import * as TypeId from "../TypeId"
import * as TypeId from "../TypeId.js"

import type * as Sink from "../Sink"
import type * as Sink from "../Sink.js"

import type { Fx, FxInput } from "../Fx"
import type { RefSubject } from "../RefSubject"
import type { Fx, FxInput } from "../Fx.js"
import type { RefSubject } from "../RefSubject.js"
import type * as Primitive from "./fx-primitive.js"

export function matchFxPrimitive<B>(
Expand Down
4 changes: 2 additions & 2 deletions packages/fx/src/internal/protos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Effectable } from "effect"
import * as Fiber from "effect/Fiber"
import { NodeInspectSymbol } from "effect/Inspectable"
import type { Inspectable } from "effect/Inspectable"
import type { Fx, ToFx } from "../Fx"
import { TypeId } from "../TypeId"
import type { Fx, ToFx } from "../Fx.js"
import { TypeId } from "../TypeId.js"

export const Variance: Fx<any, any, any>[TypeId] = {
_R: identity,
Expand Down
4 changes: 2 additions & 2 deletions packages/fx/src/internal/run.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as Effect from "effect/Effect"

import * as Sink from "../Sink"
import * as Sink from "../Sink.js"
import { compileCauseEffectOperatorSink, compileEffectOperatorSink } from "./effect-operator.js"
import * as helpers from "./helpers.js"
import { compileSyncOperatorFailureSink, compileSyncOperatorSink } from "./sync-operator.js"

import type { Fx } from "../Fx"
import type { Fx } from "../Fx.js"
import { matchFxPrimitive } from "./matchers.js"

const constUnit = () => Effect.unit
Expand Down
6 changes: 3 additions & 3 deletions packages/fx/src/internal/schema-ref-subject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { Option } from "effect"
import * as Effect from "effect/Effect"
import type * as Equivalence from "effect/Equivalence"
import type * as Scope from "effect/Scope"
import type { Fx, FxInput } from "../Fx"
import type { MakeRefSubject, RefSubject, ToRefSubject } from "../RefSubject"
import { ComputedTypeId, FilteredTypeId, RefSubjectTypeId } from "../TypeId"
import type { Fx, FxInput } from "../Fx.js"
import type { MakeRefSubject, RefSubject, ToRefSubject } from "../RefSubject.js"
import { ComputedTypeId, FilteredTypeId, RefSubjectTypeId } from "../TypeId.js"
import { make, struct } from "./core-ref-subject.js"
import { map } from "./core.js"
import { matchFxInput } from "./matchers.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/fx/src/internal/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import * as Fiber from "effect/Fiber"
import { dual } from "effect/Function"
import * as MutableRef from "effect/MutableRef"
import * as Option from "effect/Option"
import type { Fx } from "../Fx"
import type { Subject } from "../Subject"
import type { Fx } from "../Fx.js"
import type { Subject } from "../Subject.js"
import { makeHoldSubject, makeReplaySubject, makeSubject } from "./core-subject.js"
import { withScopedFork } from "./core.js"
import { ToFx } from "./fx-primitive.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/fx/src/internal/strategies.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type * as Fx from "../Fx"
import type * as Fx from "../Fx.js"

export const Unbounded: Fx.Unbounded = { _tag: "Unbounded" }

Expand Down
2 changes: 1 addition & 1 deletion packages/fx/src/internal/sync-operator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Effect from "effect/Effect"
import * as Option from "effect/Option"
import { WithContext } from "../Sink"
import { WithContext } from "../Sink.js"

// Sync operators are a subset of operators which can be safely fused together synchronously

Expand Down
4 changes: 2 additions & 2 deletions packages/fx/src/internal/versioned-transform.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Effect from "effect/Effect"
import * as Option from "effect/Option"
import type { Fx } from "../Fx"
import type { Versioned } from "../Versioned"
import type { Fx } from "../Fx.js"
import type { Versioned } from "../Versioned.js"
import { MulticastEffect } from "./helpers.js"
import { FxEffectBase } from "./protos.js"

Expand Down
6 changes: 3 additions & 3 deletions packages/fx/src/internal/withKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { equals } from "effect/Equal"
import * as Fiber from "effect/Fiber"
import * as Option from "effect/Option"
import * as Scope from "effect/Scope"
import type { Fx, FxInput } from "../Fx"
import * as RefSubject from "../RefSubject"
import * as Sink from "../Sink"
import type { Fx, FxInput } from "../Fx.js"
import * as RefSubject from "../RefSubject.js"
import * as Sink from "../Sink.js"
import * as core from "./core.js"
import { adjustTime } from "./helpers.js"
import { run } from "./run.js"
Expand Down
6 changes: 3 additions & 3 deletions packages/navigation/src/internal/fromWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import * as RefSubject from "@typed/fx/RefSubject"
import { GetRandomValues, Uuid } from "@typed/id"
import { Effect, Exit, Fiber, Option, Runtime, Scope } from "effect"
import type { Context, Layer } from "effect"
import type { Commit } from "../Layer"
import type { Commit } from "../Layer.js"
import type {
BeforeNavigationEvent,
BeforeNavigationHandler,
Destination,
NavigationEvent,
NavigationHandler,
Transition
} from "../Navigation"
import { Navigation, NavigationError } from "../Navigation"
} from "../Navigation.js"
import { Navigation, NavigationError } from "../Navigation.js"
import type { NavigationState } from "./shared.js"
import {
getOriginalState,
Expand Down
4 changes: 2 additions & 2 deletions packages/navigation/src/internal/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as RefSubject from "@typed/fx/RefSubject"
import { GetRandomValues, getRandomValues } from "@typed/id"
import { Effect, Option } from "effect"
import type { Layer, Scope } from "effect"
import type { Commit, InitialMemoryOptions, MemoryOptions } from "../Layer"
import { Navigation } from "../Navigation"
import type { Commit, InitialMemoryOptions, MemoryOptions } from "../Layer.js"
import { Navigation } from "../Navigation.js"
import type { ModelAndIntent, NavigationState } from "./shared.js"
import { getOriginFromUrl, getUrl, makeDestination, makeHandlersState, setupFromModelAndIntent } from "./shared.js"

Expand Down
6 changes: 3 additions & 3 deletions packages/navigation/src/internal/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Uuid } from "@typed/id"
import { GetRandomValues, makeUuid } from "@typed/id"
import type { Scope } from "effect"
import { Effect, Either, Option } from "effect"
import type { Commit } from "../Layer"
import type { Commit } from "../Layer.js"
import type {
BeforeNavigationEvent,
BeforeNavigationHandler,
Expand All @@ -18,8 +18,8 @@ import type {
NavigationHandler,
ProposedDestination,
RedirectError
} from "../Navigation"
import { Destination, Transition } from "../Navigation"
} from "../Navigation.js"
import { Destination, Transition } from "../Navigation.js"

export type NavigationState = {
readonly entries: ReadonlyArray<Destination>
Expand Down
2 changes: 1 addition & 1 deletion packages/template/src/internal/HydrateContext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Tagged } from "@typed/context"
import type { Template } from "../Template"
import type { Template } from "../Template.js"
import type { ParentChildNodes } from "./utils.js"

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/template/src/internal/browser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { diffable, isComment } from "@typed/wire"
import udomdiff from "udomdiff"
import type { RenderContext } from "../RenderContext"
import type { RenderEvent } from "../RenderEvent"
import { isRenderEvent } from "../RenderEvent"
import type { RenderContext } from "../RenderContext.js"
import type { RenderEvent } from "../RenderEvent.js"
import { isRenderEvent } from "../RenderEvent.js"
import { NodePartImpl } from "./parts.js"
import { findHoleComment, isCommentWithValue } from "./utils.js"

Expand Down
16 changes: 8 additions & 8 deletions packages/template/src/internal/hydrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import * as Subject from "@typed/fx/Subject"
import type { Rendered } from "@typed/wire"
import type { Cause } from "effect"
import { Effect } from "effect"
import * as ElementRef from "../ElementRef"
import type { Placeholder } from "../Placeholder"
import type { Renderable } from "../Renderable"
import type { RenderContext } from "../RenderContext"
import { DomRenderEvent } from "../RenderEvent"
import type { RenderTemplate } from "../RenderTemplate"
import { TemplateInstance } from "../TemplateInstance"
import * as ElementRef from "../ElementRef.js"
import type { Placeholder } from "../Placeholder.js"
import type { Renderable } from "../Renderable.js"
import type { RenderContext } from "../RenderContext.js"
import { DomRenderEvent } from "../RenderEvent.js"
import type { RenderTemplate } from "../RenderTemplate.js"
import { TemplateInstance } from "../TemplateInstance.js"
import { indexRefCounter } from "./indexRefCounter.js"

import { unsafeGet } from "@typed/context"

import type { Template } from "../Template"
import type { Template } from "../Template.js"
import { CouldNotFindCommentError, CouldNotFindRootElement } from "./errors.js"
import { HydrateContext } from "./HydrateContext.js"
import { buildParts, getBrowserEntry, renderTemplate, renderValues } from "./render.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/template/src/internal/module-augmentation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Placeholder } from "../Placeholder"
import type { Placeholder } from "../Placeholder.js"

declare global {
export interface String extends Placeholder<never, never, string> {}
Expand Down
6 changes: 3 additions & 3 deletions packages/template/src/internal/parser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as Chunk from "effect/Chunk"
import { globalValue } from "effect/GlobalValue"
import * as Option from "effect/Option"
import * as Template from "../Template"
import { SELF_CLOSING_TAGS, TEXT_ONLY_NODES_REGEX } from "../Token"
import * as Template from "../Template.js"
import { SELF_CLOSING_TAGS, TEXT_ONLY_NODES_REGEX } from "../Token.js"
import type { TextChunk } from "./chunks.js"
import {
getPart,
Expand Down Expand Up @@ -617,7 +617,7 @@ function parseTextAndParts<T>(s: string, f: (index: number) => T): Array<Templat
return out
}

export const parser: Parser = globalValue(Symbol.for("../Parser2"), () => new ParserImpl())
export const parser: Parser = globalValue(Symbol.for("../Parser2.js"), () => new ParserImpl())

const digestSize = 2
const multiplier = 33
Expand Down
Loading

0 comments on commit b79f52b

Please sign in to comment.