Skip to content

Commit

Permalink
Merge pull request #59 from bmcbarron/main
Browse files Browse the repository at this point in the history
Add import file extensions to support moduleResolution: NodeNext
  • Loading branch information
Akolyte01 authored Jun 5, 2023
2 parents 62ba25e + 6e2abf3 commit c2c916e
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/async-client/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Loadable, StoresValues } from '../async-stores/types';
import { AsyncClient } from './types';
import { Loadable, StoresValues } from '../async-stores/types.js';
import { AsyncClient } from './types.js';
import { get } from 'svelte/store';

/**
Expand Down
6 changes: 3 additions & 3 deletions src/async-stores/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import type {
StoresValues,
WritableLoadable,
VisitedMap,
} from './types';
import { anyReloadable, getStoresArray, reloadAll, loadAll } from '../utils';
import { flagStoreCreated, getStoreTestingMode, logError } from '../config';
} from './types.js';
import { anyReloadable, getStoresArray, reloadAll, loadAll } from '../utils/index.js';
import { flagStoreCreated, getStoreTestingMode, logError } from '../config.js';

// STORES

Expand Down
18 changes: 9 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type {
Subscriber,
Writable,
} from 'svelte/store';
export type { AsyncClient } from './async-client/types';
export type { AsyncClient } from './async-client/types.js';
export type {
LoadState,
Loadable,
Expand All @@ -17,13 +17,13 @@ export type {
AsyncStoreOptions,
Stores,
StoresValues,
} from './async-stores/types';
export type { StorageType, StorageOptions, Persisted } from './persisted/types';
} from './async-stores/types.js';
export type { StorageType, StorageOptions, Persisted } from './persisted/types.js';

export { asyncClient } from './async-client';
export { asyncWritable, asyncDerived, asyncReadable } from './async-stores';
export { configurePersistedConsent, persisted } from './persisted';
export { derived, readable, writable } from './standard-stores';
export { asyncClient } from './async-client/index.js';
export { asyncWritable, asyncDerived, asyncReadable } from './async-stores/index.js';
export { configurePersistedConsent, persisted } from './persisted/index.js';
export { derived, readable, writable } from './standard-stores/index.js';
export {
isLoadable,
isReloadable,
Expand All @@ -34,9 +34,9 @@ export {
reloadAll,
safeLoad,
rebounce,
} from './utils';
} from './utils/index.js';
export {
getStoreTestingMode,
enableStoreTestingMode,
logAsyncErrors,
} from './config';
} from './config.js';
10 changes: 5 additions & 5 deletions src/persisted/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { get, type Updater, type Subscriber } from 'svelte/store';
import { StorageType, type StorageOptions, type Persisted } from './types';
import type { Loadable } from '../async-stores/types';
import { isLoadable, reloadAll } from '../utils';
import { writable } from '../standard-stores';
import { StorageType, type StorageOptions, type Persisted } from './types.js';
import type { Loadable } from '../async-stores/types.js';
import { isLoadable, reloadAll } from '../utils/index.js';
import { writable } from '../standard-stores/index.js';
import {
getCookie,
getLocalStorageItem,
Expand All @@ -13,7 +13,7 @@ import {
removeSessionStorageItem,
removeCookie,
removeLocalStorageItem,
} from './storage-utils';
} from './storage-utils.js';

type GetStorageItem = (key: string, consentLevel?: unknown) => string | null;
type SetStorageItem = (
Expand Down
2 changes: 1 addition & 1 deletion src/persisted/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WritableLoadable } from '../async-stores/types';
import { WritableLoadable } from '../async-stores/types.js';

export type StorageType = 'LOCAL_STORAGE' | 'SESSION_STORAGE' | 'COOKIE';

Expand Down
6 changes: 3 additions & 3 deletions src/standard-stores/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import {
type Writable,
writable as vanillaWritable,
} from 'svelte/store';
import { anyReloadable, loadAll, reloadAll } from '../utils';
import { anyReloadable, loadAll, reloadAll } from '../utils/index.js';
import type {
Loadable,
Stores,
StoresValues,
VisitedMap,
} from '../async-stores/types';
import { flagStoreCreated } from '../config';
} from '../async-stores/types.js';
import { flagStoreCreated } from '../config.js';

const loadDependencies = async <S extends Stores, T>(
thisStore: Readable<T>,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
type Reloadable,
type Stores,
type StoresValues,
} from '../async-stores/types';
} from '../async-stores/types.js';

export const getStoresArray = (stores: Stores): StoresArray => {
return Array.isArray(stores) ? stores : [stores];
Expand Down

0 comments on commit c2c916e

Please sign in to comment.