Skip to content

Commit 4c0591a

Browse files
committed
Upgrade package setup
1 parent bb1092b commit 4c0591a

File tree

8 files changed

+24
-18
lines changed

8 files changed

+24
-18
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@date-fns/docs",
3-
"version": "0.34.0",
3+
"version": "0.35.0",
44
"description": "date-fns documentation utilities & types",
55
"type": "module",
66
"main": "index.js",

src/bin.ts

+11-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@
22

33
import * as admin from "firebase-admin";
44
import { readFile } from "fs/promises";
5+
// @ts-expect-error: [TODO] Fix js-fns
56
import { pick } from "js-fns";
67
import path from "path";
78
import { stringify } from "typeroo/json";
89
import { batch } from "typesaurus";
9-
import { packageName, allSubmodules } from "./consts";
10-
import { db } from "./db";
11-
import { readRefsFromJSON } from "./json";
12-
import { findCategory, findFnSummary, findFnTag, findSummary } from "./utils";
13-
import type { DateFnsDocs } from "./types";
10+
import { packageName, allSubmodules } from "./consts.js";
11+
import { db } from "./db.js";
12+
import { readRefsFromJSON } from "./json.js";
13+
import {
14+
findCategory,
15+
findFnSummary,
16+
findFnTag,
17+
findSummary,
18+
} from "./utils.js";
19+
import type { DateFnsDocs } from "./types.js";
1420

1521
admin.initializeApp();
1622

src/db.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { schema, Typesaurus } from "typesaurus";
2-
import type { DateFnsDocs } from "./types";
2+
import type { DateFnsDocs } from "./types.js";
33

44
export const db = schema(($) => ({
55
packages: $.collection<DateFnsDocs.Package>(),

src/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export * from "./db";
2-
export * from "./consts";
3-
export * from "./json";
4-
export * from "./utils";
5-
export type { DateFnsDocs } from "./types";
1+
export * from "./db.js";
2+
export * from "./consts.js";
3+
export * from "./json.js";
4+
export * from "./utils.js";
5+
export type { DateFnsDocs } from "./types.js";

src/json.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import type {
77
SomeType,
88
TypeParameterReflection,
99
} from "typedoc";
10-
import type { DateFnsDocs } from "./types";
11-
import { findFn, traverseType } from "./utils";
10+
import type { DateFnsDocs } from "./types.js";
11+
import { findFn, traverseType } from "./utils.js";
1212

1313
/**
1414
* Reads and parses TypeDoc JSON and extracts reflections.

src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export namespace DateFnsDocs {
6060
/**
6161
* The submodule type.
6262
*/
63-
export type Submodule = typeof import("./consts").allSubmodules[number];
63+
export type Submodule = typeof import("./consts.js").allSubmodules[number];
6464

6565
/**
6666
* The package model.

src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
SignatureReflection,
77
SomeType,
88
} from "typedoc";
9-
import { DateFnsDocs } from "./types";
9+
import { DateFnsDocs } from "./types.js";
1010

1111
/**
1212
* Find reflection category in a reflection container.

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"compilerOptions": {
33
"target": "ESNext",
44
"lib": [],
5-
"module": "ESNext",
6-
"moduleResolution": "node",
5+
"module": "NodeNext",
6+
"moduleResolution": "NodeNext",
77
"esModuleInterop": true,
88
"forceConsistentCasingInFileNames": true,
99
"strict": true,

0 commit comments

Comments
 (0)