Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: build path compatibility with nodejs v20 #2464

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/docs/run-typedoc.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { createTypeDocApp } from './typedoc-markdown.mjs'

const __dirname = path.dirname(new URL(import.meta.url).pathname)
const pathname = process.platform === 'win32' ? fileURLToPath(import.meta.url) : new URL(import.meta.url).pathname
const __dirname = path.dirname(pathname)

createTypeDocApp({
name: 'API Documentation',
Expand Down
4 changes: 3 additions & 1 deletion packages/docs/typedoc-markdown.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// @ts-check
import fs from 'node:fs/promises'
import path from 'node:path'
import {fileURLToPath} from 'node:url'
import { Application, PageEvent, TSConfigReader } from 'typedoc'

const __dirname = path.dirname(new URL(import.meta.url).pathname)
const pathname = process.platform === 'win32' ? fileURLToPath(import.meta.url) : new URL(import.meta.url).pathname
const __dirname = path.dirname(pathname)

const DEFAULT_OPTIONS = {
// disableOutputCheck: true,
Expand Down
4 changes: 3 additions & 1 deletion packages/router/size-checks/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import path from 'node:path'
import {fileURLToPath} from 'node:url'
import ts from 'rollup-plugin-typescript2'
import replace from '@rollup/plugin-replace'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import terser from '@rollup/plugin-terser'
import { defineConfig } from 'rollup'

const __dirname = path.dirname(new URL(import.meta.url).pathname)
const pathname = process.platform === 'win32' ? fileURLToPath(import.meta.url) : new URL(import.meta.url).pathname
const __dirname = path.dirname(pathname)

const config = defineConfig({
external: ['vue'],
Expand Down
4 changes: 3 additions & 1 deletion scripts/check-size.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import fs from 'node:fs/promises'
import path from 'node:path'
import {fileURLToPath} from 'node:url'
import chalk from 'chalk'
import { gzipSync } from 'zlib'
import { compress } from 'brotli'

const __dirname = path.dirname(new URL(import.meta.url).pathname)
const pathname = process.platform === 'win32' ? fileURLToPath(import.meta.url) : new URL(import.meta.url).pathname
const __dirname = path.dirname(pathname)

async function checkFileSize(filePath) {
const stat = await fs.stat(filePath).catch(() => null)
Expand Down