Skip to content

Commit

Permalink
Merge tag '0.6.4'
Browse files Browse the repository at this point in the history
LogTape 0.6.4
  • Loading branch information
dahlia committed Oct 28, 2024
2 parents 988a27a + 4e6b7bc commit c0f9fbe
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
deno-version: v2.x
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
deno-version: v2.x
- if: github.ref_type == 'branch'
run: |
jq \
Expand Down
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ Version 0.7.0
To be released.


Version 0.6.4
-------------

Released on October 28, 2024.

- Fixed a build warning due to importing `node:fs` and `node:util` modules on
Next.js' client rendering. [[#19]]
- Made it to work on Deno 2.0.0 or higher.

[#19]: https://github.com/dahlia/logtape/issues/19


Version 0.6.3
-------------

Expand Down
1 change: 1 addition & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"exclude": [
"*-venv/",
".github/",
"coverage/",
"docs/",
"npm/"
Expand Down
11 changes: 0 additions & 11 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { Presets, SingleBar } from "cli-progress";
import { jsrRef } from "markdown-it-jsr-ref";
import { defineConfig } from "vitepress";
import { transformerTwoslash } from "@shikijs/vitepress-twoslash";

const progress = new SingleBar({}, Presets.shades_classic);
let started = false;

const jsrRefVersion =
process.env.CI === "true" && process.env.GITHUB_REF_TYPE === "tag"
? "stable"
Expand All @@ -15,13 +11,6 @@ const jsrRefPlugin = await jsrRef({
package: "@logtape/logtape",
version: jsrRefVersion,
cachePath: ".jsr-cache.json",
progress: (complete: number, total: number) => {
if (started) progress.update(complete);
else {
started = true;
progress.start(total, complete);
}
},
});

let extraNav: { text: string; link: string }[] = [];
Expand Down
Binary file modified docs/bun.lockb
Binary file not shown.
5 changes: 2 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@cloudflare/workers-types": "^4.20240909.0",
"@logtape/logtape": "^0.6.0-dev.82",
"@logtape/logtape": "^0.6.3",
"@logtape/otel": "^0.2.0",
"@shikijs/vitepress-twoslash": "^1.17.6",
"@teidesu/deno-types": "^1.46.3",
"@types/bun": "^1.1.9",
"@types/node": "^22.5.5",
"cli-progress": "^3.12.0",
"markdown-it-jsr-ref": "^0.3.2",
"markdown-it-jsr-ref": "^0.4.0",
"vitepress": "^1.3.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions logtape/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ export async function configure<
if (Symbol.dispose in filter) disposables.add(filter as Disposable);
}

if ("process" in globalThis) { // @ts-ignore: It's fine to use process in Node
// deno-lint-ignore no-node-globals
if ("process" in globalThis && !("Deno" in globalThis)) { // @ts-ignore: It's fine to use process in Node
// deno-lint-ignore no-process-globals
process.on("exit", dispose);
} else { // @ts-ignore: It's fine to addEventListener() on the browser/Deno
addEventListener("unload", dispose);
Expand Down
12 changes: 7 additions & 5 deletions logtape/fs.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
let fs = null;
if (
"process" in globalThis && "versions" in globalThis.process &&
"node" in globalThis.process.versions &&
typeof globalThis.caches === "undefined" &&
typeof globalThis.addEventListener !== "function" ||
"Bun" in globalThis
typeof window === "undefined" && (
"process" in globalThis && "versions" in globalThis.process &&
"node" in globalThis.process.versions &&
typeof globalThis.caches === "undefined" &&
typeof globalThis.addEventListener !== "function" ||
"Bun" in globalThis
)
) {
try {
// Intentionally confuse static analysis of bundlers:
Expand Down
12 changes: 7 additions & 5 deletions logtape/nodeUtil.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
let util = null;
if (
"process" in globalThis && "versions" in globalThis.process &&
"node" in globalThis.process.versions &&
typeof globalThis.caches === "undefined" &&
typeof globalThis.addEventListener !== "function" ||
"Bun" in globalThis
typeof window === "undefined" && (
"process" in globalThis && "versions" in globalThis.process &&
"node" in globalThis.process.versions &&
typeof globalThis.caches === "undefined" &&
typeof globalThis.addEventListener !== "function" ||
"Bun" in globalThis
)
) {
try {
// Intentionally confuse static analysis of bundlers:
Expand Down

0 comments on commit c0f9fbe

Please sign in to comment.