From b75a0a1565231879951aefc7801adb8283f1bdaf Mon Sep 17 00:00:00 2001 From: Samodya Abeysiriwardane Date: Mon, 8 Jul 2024 00:23:12 -0500 Subject: [PATCH] Use latest astro-adocx package --- adocx/config.ts | 2 +- adocx/extensions/inlineMacroCallout.ts | 2 +- adocx/templates/inline_quoted.ts | 4 +-- adocx/templates/listing.ts | 6 ++-- adocx/templates/stem.ts | 6 ++-- astro.config.js | 2 +- package.json | 4 +-- pnpm-lock.yaml | 36 +++++++++---------- src/env.d.ts | 1 + .../adocNoteLayout/AdocNoteLayout.astro | 2 +- src/layouts/noteLayout/NoteLayout.astro | 2 +- src/lib/astro/codeListing/CodeListing.astro | 2 +- src/lib/astro/mathtex/Mathtex.astro | 2 +- tsconfig.json | 2 +- 14 files changed, 37 insertions(+), 36 deletions(-) diff --git a/adocx/config.ts b/adocx/config.ts index c6580ed..f03ea4b 100644 --- a/adocx/config.ts +++ b/adocx/config.ts @@ -2,7 +2,7 @@ import path from 'node:path'; // @ts-ignore: Types are not available import { register as krokiPluginRegisterHandle } from 'asciidoctor-kroki'; -import type { AdocOptions, AstroAdocxOptions, Template } from '@sransara/astro-adocx/types'; +import type { AdocOptions, AstroAdocxOptions, Template } from '@sransara/astro-adocx/types.js'; import { register as inlineMacroCalloutRegisterHandle } from './extensions/inlineMacroCallout'; diff --git a/adocx/extensions/inlineMacroCallout.ts b/adocx/extensions/inlineMacroCallout.ts index 8358849..bccdaf5 100644 --- a/adocx/extensions/inlineMacroCallout.ts +++ b/adocx/extensions/inlineMacroCallout.ts @@ -1,6 +1,6 @@ import type { Extensions } from 'asciidoctor'; -import { isExtensionSingleton } from '@sransara/astro-adocx/types'; +import { isExtensionSingleton } from '@sransara/astro-adocx/types.js'; export function register(registry: typeof Extensions | Extensions.Registry) { if (isExtensionSingleton(registry)) { diff --git a/adocx/templates/inline_quoted.ts b/adocx/templates/inline_quoted.ts index babc56b..bf302da 100644 --- a/adocx/templates/inline_quoted.ts +++ b/adocx/templates/inline_quoted.ts @@ -1,6 +1,6 @@ import type { Inline } from 'asciidoctor'; -import { UnsupportedNode, type Template } from '@sransara/astro-adocx/types'; -import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence'; +import { UnsupportedNode, type Template } from '@sransara/astro-adocx/types.js'; +import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence.js'; export const convert: Template['convert'] = (node: Inline, _opts?: any) => { const nodeType = node.getType(); diff --git a/adocx/templates/listing.ts b/adocx/templates/listing.ts index 15d95dc..d6fb46d 100644 --- a/adocx/templates/listing.ts +++ b/adocx/templates/listing.ts @@ -2,9 +2,9 @@ // - https://github.com/asciidoctor/asciidoctor-backends/blob/master/erb/html5/block_math.html.erb import type { Block } from 'asciidoctor'; -import { type Template } from '@sransara/astro-adocx/types'; -import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence'; -import { atag } from '@sransara/astro-adocx/utils/asx'; +import { type Template } from '@sransara/astro-adocx/types.js'; +import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence.js'; +import { atag } from '@sransara/astro-adocx/utils/asx.js'; export const convert: Template['convert'] = (node: Block, _opts?: any) => { const id = node.getId(); diff --git a/adocx/templates/stem.ts b/adocx/templates/stem.ts index b6888a8..355dfd4 100644 --- a/adocx/templates/stem.ts +++ b/adocx/templates/stem.ts @@ -2,9 +2,9 @@ // - https://github.com/asciidoctor/asciidoctor-backends/blob/master/erb/html5/block_math.html.erb import type { Block } from 'asciidoctor'; -import { type Template } from '@sransara/astro-adocx/types'; -import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence'; -import { atag } from '@sransara/astro-adocx/utils/asx'; +import { type Template } from '@sransara/astro-adocx/types.js'; +import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence.js'; +import { atag } from '@sransara/astro-adocx/utils/asx.js'; export const convert: Template['convert'] = (node: Block, _opts?: any) => { const id = node.getId(); diff --git a/astro.config.js b/astro.config.js index 83c76b2..22ded70 100644 --- a/astro.config.js +++ b/astro.config.js @@ -1,7 +1,7 @@ import sitemap from '@astrojs/sitemap'; import solid from '@astrojs/solid-js'; import tailwind from '@astrojs/tailwind'; -import { adocx } from '@sransara/astro-adocx/integration'; +import { adocx } from '@sransara/astro-adocx/integration.js'; import { defineConfig } from 'astro/config'; import { adocxConfig, asciidoctorConfig } from './adocx/config'; diff --git a/package.json b/package.json index 24d211b..fead5e5 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@astrojs/solid-js": "^4.4.0", "@astrojs/tailwind": "^5.1.0", "@eslint/js": "^9.6.0", - "@sransara/astro-adocx": "^0.0.10", + "@sransara/astro-adocx": "^0.0.12", "@types/eslint": "^8.56.10", "@types/eslint__js": "^8.42.3", "@types/katex": "^0.16.7", @@ -38,7 +38,7 @@ "postcss-load-config": "^6.0.1", "prettier": "^3.3.2", "prettier-plugin-astro": "^0.14.0", - "prettier-plugin-organize-imports": "^3.2.4", + "prettier-plugin-organize-imports": "^4.0.0", "prettier-plugin-tailwindcss": "^0.6.5", "sharp": "^0.33.4", "shiki": "^1.10.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f182146..78464f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: ^9.6.0 version: 9.6.0 '@sransara/astro-adocx': - specifier: ^0.0.10 - version: 0.0.10(asciidoctor@3.0.4(chokidar@3.6.0))(astro@4.11.5(@types/node@20.14.10)(typescript@5.5.3))(vite@5.3.3(@types/node@20.14.10)) + specifier: ^0.0.12 + version: 0.0.12(asciidoctor@3.0.4(chokidar@3.6.0))(astro@4.11.5(@types/node@20.14.10)(typescript@5.5.3))(vite@5.3.3(@types/node@20.14.10)) '@types/eslint': specifier: ^8.56.10 version: 8.56.10 @@ -87,11 +87,11 @@ importers: specifier: ^0.14.0 version: 0.14.0 prettier-plugin-organize-imports: - specifier: ^3.2.4 - version: 3.2.4(prettier@3.3.2)(typescript@5.5.3) + specifier: ^4.0.0 + version: 4.0.0(prettier@3.3.2)(typescript@5.5.3) prettier-plugin-tailwindcss: specifier: ^0.6.5 - version: 0.6.5(prettier-plugin-astro@0.14.0)(prettier-plugin-organize-imports@3.2.4(prettier@3.3.2)(typescript@5.5.3))(prettier@3.3.2) + version: 0.6.5(prettier-plugin-astro@0.14.0)(prettier-plugin-organize-imports@4.0.0(prettier@3.3.2)(typescript@5.5.3))(prettier@3.3.2) sharp: specifier: ^0.33.4 version: 0.33.4 @@ -841,12 +841,12 @@ packages: peerDependencies: solid-js: ^1.6.12 - '@sransara/astro-adocx@0.0.10': - resolution: {integrity: sha512-HjhKbn4IwxI8UcoEinmJO5RV5PwX+FLjc9rG8Bx+u6w5DR1nkew2YAu1oKdwodAW8P+XzlmNuiZFK+pgTkUK4Q==, tarball: https://registry.npmjs.org/@sransara/astro-adocx/-/astro-adocx-0.0.10.tgz} + '@sransara/astro-adocx@0.0.12': + resolution: {integrity: sha512-RdOba6RLtwRgShiZM444YGDimd36Fp4PgYhNlPGqiOSZVDnaaY0D1q5opVHI51EywdNECcpUZTK0pkQuL3SX+w==, tarball: https://registry.npmjs.org/@sransara/astro-adocx/-/astro-adocx-0.0.12.tgz} peerDependencies: asciidoctor: ^3.0.4 astro: ^4.10.2 - vite: 5.3.1 + vite: ^5.3.1 '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==, tarball: https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz} @@ -2340,17 +2340,17 @@ packages: resolution: {integrity: sha512-7jRGJsexaRIyUzTk8uzXlP45cw6DQ5Ci4bTe0xCBCcuO1Fff8jJy9oI+kRCQKSdDFTSAArMSg8GpvzlKBtSaZA==, tarball: https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.14.0.tgz} engines: {node: ^14.15.0 || >=16.0.0} - prettier-plugin-organize-imports@3.2.4: - resolution: {integrity: sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==, tarball: https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.4.tgz} + prettier-plugin-organize-imports@4.0.0: + resolution: {integrity: sha512-vnKSdgv9aOlqKeEFGhf9SCBsTyzDSyScy1k7E0R1Uo4L0cTcOV7c1XQaT7jfXIOc/p08WLBfN2QUQA9zDSZMxA==, tarball: https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-4.0.0.tgz} peerDependencies: - '@volar/vue-language-plugin-pug': ^1.0.4 - '@volar/vue-typescript': ^1.0.4 + '@vue/language-plugin-pug': ^2.0.24 prettier: '>=2.0' typescript: '>=2.9' + vue-tsc: ^2.0.24 peerDependenciesMeta: - '@volar/vue-language-plugin-pug': + '@vue/language-plugin-pug': optional: true - '@volar/vue-typescript': + vue-tsc: optional: true prettier-plugin-tailwindcss@0.6.5: @@ -3812,7 +3812,7 @@ snapshots: dependencies: solid-js: 1.8.18 - '@sransara/astro-adocx@0.0.10(asciidoctor@3.0.4(chokidar@3.6.0))(astro@4.11.5(@types/node@20.14.10)(typescript@5.5.3))(vite@5.3.3(@types/node@20.14.10))': + '@sransara/astro-adocx@0.0.12(asciidoctor@3.0.4(chokidar@3.6.0))(astro@4.11.5(@types/node@20.14.10)(typescript@5.5.3))(vite@5.3.3(@types/node@20.14.10))': dependencies: app-root-path: 3.1.0 asciidoctor: 3.0.4(chokidar@3.6.0) @@ -5625,17 +5625,17 @@ snapshots: prettier: 3.3.2 sass-formatter: 0.7.9 - prettier-plugin-organize-imports@3.2.4(prettier@3.3.2)(typescript@5.5.3): + prettier-plugin-organize-imports@4.0.0(prettier@3.3.2)(typescript@5.5.3): dependencies: prettier: 3.3.2 typescript: 5.5.3 - prettier-plugin-tailwindcss@0.6.5(prettier-plugin-astro@0.14.0)(prettier-plugin-organize-imports@3.2.4(prettier@3.3.2)(typescript@5.5.3))(prettier@3.3.2): + prettier-plugin-tailwindcss@0.6.5(prettier-plugin-astro@0.14.0)(prettier-plugin-organize-imports@4.0.0(prettier@3.3.2)(typescript@5.5.3))(prettier@3.3.2): dependencies: prettier: 3.3.2 optionalDependencies: prettier-plugin-astro: 0.14.0 - prettier-plugin-organize-imports: 3.2.4(prettier@3.3.2)(typescript@5.5.3) + prettier-plugin-organize-imports: 4.0.0(prettier@3.3.2)(typescript@5.5.3) prettier@3.3.2: {} diff --git a/src/env.d.ts b/src/env.d.ts index f964fe0..cbecf5d 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,2 @@ /// +/// diff --git a/src/layouts/adocNoteLayout/AdocNoteLayout.astro b/src/layouts/adocNoteLayout/AdocNoteLayout.astro index 494e4df..1226f82 100644 --- a/src/layouts/adocNoteLayout/AdocNoteLayout.astro +++ b/src/layouts/adocNoteLayout/AdocNoteLayout.astro @@ -1,6 +1,6 @@ --- import type { ImageMetadata } from 'astro'; -import type { Outline } from '@sransara/astro-adocx/utils/outline'; +import type { Outline } from '@sransara/astro-adocx/utils/outline.js'; import type { Metadata } from '@/src/lib/types/notes'; import NoteLayout from '@/src/layouts/noteLayout/NoteLayout.astro'; diff --git a/src/layouts/noteLayout/NoteLayout.astro b/src/layouts/noteLayout/NoteLayout.astro index a68577d..157d294 100644 --- a/src/layouts/noteLayout/NoteLayout.astro +++ b/src/layouts/noteLayout/NoteLayout.astro @@ -1,7 +1,7 @@ --- import { Image } from 'astro:assets'; import type { ImageMetadata } from 'astro'; -import type { Outline } from '@sransara/astro-adocx/utils/outline'; +import type { Outline } from '@sransara/astro-adocx/utils/outline.js'; import siteValues from '@/site.values.js'; import type { Metadata } from '@/src/lib/types/notes'; diff --git a/src/lib/astro/codeListing/CodeListing.astro b/src/lib/astro/codeListing/CodeListing.astro index ffc5d1c..d73e437 100644 --- a/src/lib/astro/codeListing/CodeListing.astro +++ b/src/lib/astro/codeListing/CodeListing.astro @@ -1,6 +1,6 @@ --- import { codeToHtml, bundledLanguages } from 'shiki'; -import { decodeSpecialChars } from '@sransara/astro-adocx/utils/string'; +import { decodeSpecialChars } from '@sransara/astro-adocx/utils/string.js'; interface Props { lang: string; diff --git a/src/lib/astro/mathtex/Mathtex.astro b/src/lib/astro/mathtex/Mathtex.astro index 39daf2c..c769858 100644 --- a/src/lib/astro/mathtex/Mathtex.astro +++ b/src/lib/astro/mathtex/Mathtex.astro @@ -1,6 +1,6 @@ --- import AsciiMathParser from 'asciimath2tex'; -import { decodeSpecialChars } from '@sransara/astro-adocx/utils/string'; +import { decodeSpecialChars } from '@sransara/astro-adocx/utils/string.js'; import katex, { type KatexOptions } from 'katex'; import 'katex/dist/katex.min.css'; diff --git a/tsconfig.json b/tsconfig.json index 003177e..93d9b06 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ }, "checkJs": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "solid-js" }, "exclude": [ "dist"