From 10225d93d2ae010753966667801b84781bb416bd Mon Sep 17 00:00:00 2001 From: Cooper Benson Date: Sun, 3 Nov 2024 12:14:23 -0700 Subject: [PATCH 1/2] fix: exporting types --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index 3193e9a3..26ac9cda 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,10 @@ +export type { + UUIDTypes, + Version1Options, + Version4Options, + Version6Options, + Version7Options, +} from './_types.js'; export { default as MAX } from './max.js'; export { default as NIL } from './nil.js'; export { default as parse } from './parse.js'; From 2a18eab46b078cddfee02f6766fefb9782abdf2f Mon Sep 17 00:00:00 2001 From: Cooper Benson Date: Mon, 4 Nov 2024 09:33:49 -0700 Subject: [PATCH 2/2] fix: address PR feedback --- src/index.ts | 8 +------- src/test/v7.test.ts | 2 +- src/{_types.ts => types.ts} | 0 src/v1.ts | 2 +- src/v1ToV6.ts | 2 +- src/v3.ts | 2 +- src/v35.ts | 2 +- src/v4.ts | 2 +- src/v5.ts | 2 +- src/v6.ts | 2 +- src/v6ToV1.ts | 2 +- src/v7.ts | 2 +- 12 files changed, 11 insertions(+), 17 deletions(-) rename src/{_types.ts => types.ts} (100%) diff --git a/src/index.ts b/src/index.ts index 26ac9cda..d7d4edc3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,4 @@ -export type { - UUIDTypes, - Version1Options, - Version4Options, - Version6Options, - Version7Options, -} from './_types.js'; +export type * from './types.js'; export { default as MAX } from './max.js'; export { default as NIL } from './nil.js'; export { default as parse } from './parse.js'; diff --git a/src/test/v7.test.ts b/src/test/v7.test.ts index 062b95a7..a29600fb 100644 --- a/src/test/v7.test.ts +++ b/src/test/v7.test.ts @@ -1,6 +1,6 @@ import * as assert from 'assert'; import test, { describe } from 'node:test'; -import { Version7Options } from '../_types.js'; +import { Version7Options } from '../types.js'; import parse from '../parse.js'; import stringify from '../stringify.js'; import v7, { updateV7State } from '../v7.js'; diff --git a/src/_types.ts b/src/types.ts similarity index 100% rename from src/_types.ts rename to src/types.ts diff --git a/src/v1.ts b/src/v1.ts index 0218251d..e0b393bf 100644 --- a/src/v1.ts +++ b/src/v1.ts @@ -1,4 +1,4 @@ -import { UUIDTypes, Version1Options } from './_types.js'; +import { UUIDTypes, Version1Options } from './types.js'; import rng from './rng.js'; import { unsafeStringify } from './stringify.js'; diff --git a/src/v1ToV6.ts b/src/v1ToV6.ts index f6cc2721..2ead3175 100644 --- a/src/v1ToV6.ts +++ b/src/v1ToV6.ts @@ -1,4 +1,4 @@ -import { UUIDTypes } from './_types.js'; +import { UUIDTypes } from './types.js'; import parse from './parse.js'; import { unsafeStringify } from './stringify.js'; diff --git a/src/v3.ts b/src/v3.ts index caf9dcc9..2e889cae 100644 --- a/src/v3.ts +++ b/src/v3.ts @@ -1,4 +1,4 @@ -import { UUIDTypes } from './_types.js'; +import { UUIDTypes } from './types.js'; import md5 from './md5.js'; import v35, { DNS, URL } from './v35.js'; diff --git a/src/v35.ts b/src/v35.ts index 09df6cf2..faaf0456 100644 --- a/src/v35.ts +++ b/src/v35.ts @@ -1,4 +1,4 @@ -import { UUIDTypes } from './_types.js'; +import { UUIDTypes } from './types.js'; import parse from './parse.js'; import { unsafeStringify } from './stringify.js'; diff --git a/src/v4.ts b/src/v4.ts index 3370e554..8981a273 100644 --- a/src/v4.ts +++ b/src/v4.ts @@ -1,4 +1,4 @@ -import { UUIDTypes, Version4Options } from './_types.js'; +import { UUIDTypes, Version4Options } from './types.js'; import native from './native.js'; import rng from './rng.js'; import { unsafeStringify } from './stringify.js'; diff --git a/src/v5.ts b/src/v5.ts index fd01efd6..beb78ee4 100644 --- a/src/v5.ts +++ b/src/v5.ts @@ -1,4 +1,4 @@ -import { UUIDTypes } from './_types.js'; +import { UUIDTypes } from './types.js'; import sha1 from './sha1.js'; import v35, { DNS, URL } from './v35.js'; diff --git a/src/v6.ts b/src/v6.ts index 665d1d4e..bad1608f 100644 --- a/src/v6.ts +++ b/src/v6.ts @@ -1,4 +1,4 @@ -import { UUIDTypes, Version6Options } from './_types.js'; +import { UUIDTypes, Version6Options } from './types.js'; import { unsafeStringify } from './stringify.js'; import v1 from './v1.js'; import v1ToV6 from './v1ToV6.js'; diff --git a/src/v6ToV1.ts b/src/v6ToV1.ts index 735898aa..a6c28e5a 100644 --- a/src/v6ToV1.ts +++ b/src/v6ToV1.ts @@ -1,4 +1,4 @@ -import { UUIDTypes } from './_types.js'; +import { UUIDTypes } from './types.js'; import parse from './parse.js'; import { unsafeStringify } from './stringify.js'; diff --git a/src/v7.ts b/src/v7.ts index f24ba3af..2ee937df 100644 --- a/src/v7.ts +++ b/src/v7.ts @@ -1,4 +1,4 @@ -import { UUIDTypes, Version7Options } from './_types.js'; +import { UUIDTypes, Version7Options } from './types.js'; import rng from './rng.js'; import { unsafeStringify } from './stringify.js';