Skip to content

Commit

Permalink
Use rewriteRelativeImportExtensions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlttiRi committed Oct 2, 2024
1 parent d03de18 commit b61ce26
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ index.js
index.d.ts
*.tgz
todo.txt
tsconfig.tsbuildinfo
3 changes: 2 additions & 1 deletion demos/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"module": "ESNext",
"moduleResolution": "Bundler",
"noEmit": true,
"allowImportingTsExtensions": true
"allowImportingTsExtensions": true,
"rewriteRelativeImportExtensions": false,
},
"include": ["./**/*"]
}
20 changes: 10 additions & 10 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export * from "./src/sync/VoidFunc.js";
export * from "./src/sync/Semaphore.js";
export * from "./src/sync/CountLatch.js";
export * from "./src/sync/AsyncBufferQueue.js";
export * from "./src/sync/Queue.js";
export * from "./src/sync/VoidFunc.ts";
export * from "./src/sync/Semaphore.ts";
export * from "./src/sync/CountLatch.ts";
export * from "./src/sync/AsyncBufferQueue.ts";
export * from "./src/sync/Queue.ts";

export * from "./src/byte-size-converter.js";
export * from "./src/date-formatter.js";
export * from "./src/delay.js";
export * from "./src/sleep.js";
export * from "./src/util.js";
export * from "./src/byte-size-converter.ts";
export * from "./src/date-formatter.ts";
export * from "./src/delay.ts";
export * from "./src/sleep.ts";
export * from "./src/util.ts";
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alttiri/util-js",
"version": "1.14.1-20240908",
"version": "1.15.0-dev.20241002",
"description": "Some util functions for personal use",
"homepage": "https://github.com/AlttiRi/util-js",
"keywords": [
Expand Down Expand Up @@ -45,6 +45,6 @@
},
"devDependencies": {
"@alttiri/util-node-js": "2.2.0-20240821",
"typescript": "5.5.4"
"typescript": "5.7.0-dev.20241002"
}
}
2 changes: 1 addition & 1 deletion src/date-formatter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isString} from "./util.js";
import {isString} from "./util.ts";

/**
* "Sun, 10 Jan 2021 22:22:22 GMT" -> "2021.01.10"
Expand Down
4 changes: 2 additions & 2 deletions src/sync/AsyncBufferQueue.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {VoidFunc} from "./VoidFunc.js";
import {Semaphore} from "./Semaphore.js";
import {VoidFunc} from "./VoidFunc.ts";
import {Semaphore} from "./Semaphore.ts";

/**
* Use it when in one place you need to `enqueue()` some `value`, until `close()`.
Expand Down
2 changes: 1 addition & 1 deletion src/sync/CountLatch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {VoidFunc} from "./VoidFunc.js";
import {VoidFunc} from "./VoidFunc.ts";

export class CountLatch {
private count: number;
Expand Down
2 changes: 1 addition & 1 deletion src/sync/Semaphore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {VoidFunc} from "./VoidFunc.js";
import {VoidFunc} from "./VoidFunc.ts";

/** The most simple semaphore implementation. */
export class Semaphore {
Expand Down
2 changes: 1 addition & 1 deletion tests/format-size-win-like.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {formatSizeWinLike} from "../src/byte-size-converter.js";
import {formatSizeWinLike} from "../src/byte-size-converter.ts";

import {Tester} from "@alttiri/util-node-js";
const {eq, report} = new Tester().destructible();
Expand Down
2 changes: 1 addition & 1 deletion tests/to-trunc-precision-3.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {formatNumber, toTruncPrecision3} from "../src/byte-size-converter.js";
import {formatNumber, toTruncPrecision3} from "../src/byte-size-converter.ts";

import {Tester} from "@alttiri/util-node-js";
const {eq, report} = new Tester().destructible();
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
/* Library preset */
"module": "NodeNext",
"moduleResolution": "NodeNext",
"allowImportingTsExtensions": false,
"allowImportingTsExtensions": true,
"rewriteRelativeImportExtensions": true,
"noEmit": false,
"declaration": true,

Expand Down

0 comments on commit b61ce26

Please sign in to comment.