Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: test

on: [push]

env:
VP_TOKEN: ${{ secrets.VP_TOKEN }}

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -19,7 +22,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
with:
version: 8.*
version: 10.*
- run: pnpm dev:setup

- name: Run checks
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
auto-install-peers=false
resolution-mode=highest
strict-peer-dependencies=false
@voidzero-dev:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${VP_TOKEN}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

Storing authentication tokens, even as environment variable placeholders, in a version-controlled file can be a security risk. It's generally better to configure this in a user-level .npmrc file (~/.npmrc) or a local, git-ignored .npmrc file to avoid any possibility of leaking credentials or internal configuration details.

3 changes: 2 additions & 1 deletion examples/tokyo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@vitejs/plugin-react": "^5.1.0",
"vite": "^7.2.0"
"@voidzero-dev/vite-plus": "catalog:",
"vite": "catalog:"
}
}
2 changes: 1 addition & 1 deletion examples/tokyo/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import remdx from '@nkzw/vite-plugin-remdx';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { defineConfig } from '@voidzero-dev/vite-plus';

export default defineConfig({
plugins: [remdx(), react()],
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"lint:format": "prettier --experimental-cli --cache --check .",
"test": "npm-run-all --parallel tsc:check vitest:run lint lint:format",
"tsc:check": "tsc",
"vitest:run": "vitest run"
"vitest:run": "vite test run"
},
"devDependencies": {
"@babel/plugin-syntax-typescript": "^7.27.1",
Expand All @@ -27,17 +27,18 @@
"@styled/typescript-styled-plugin": "^1.0.1",
"@swc/core": "^1.15.0",
"@types/node": "^24.10.0",
"@voidzero-dev/vite-plus": "catalog:",
"eslint": "^9.39.1",
"nodemon": "^3.1.10",
"npm-run-all2": "^8.0.4",
"prettier": "^3.6.2",
"prettier-plugin-packagejson": "^2.5.19",
"ts-node": "^10.9.2",
"tsdown": "^0.16.0",
"typescript": "^5.9.3",
"vite": "^7.2.0",
"vitest": "^4.0.7"
"vite": "catalog:",
"vitest": "catalog:"
},
"packageManager": "pnpm@10.26.2",
"engines": {
"node": ">=18.7.0",
"pnpm": ">=7.9.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/create-remdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"create-remdx": "index.mjs"
},
"scripts": {
"build": "rm -f index.mjs; tsdown index.tsx --outDir=./ --clean=false --target=node22 --format=esm"
"build": "rm -f index.mjs; vite lib index.tsx --outDir=./ --clean=false --target=node22 --format=esm"
},
"devDependencies": {
"@types/minimist": "^1.2.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-remdx/template/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import remdx from '@nkzw/vite-plugin-remdx';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { defineConfig } from '@voidzero-dev/vite-plus';

export default defineConfig({
plugins: [remdx(), react()],
Expand Down
2 changes: 1 addition & 1 deletion packages/remdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"main": "./index.js",
"types": "./index.d.ts",
"scripts": {
"build": "rm -f index.js; tsdown index.tsx --outDir=./ --clean=false --target=es2022 --platform=browser --format=esm -dts"
"build": "rm -f index.js; vite lib index.tsx --outDir=./ --clean=false --target=es2022 --platform=browser --format=esm -dts"
},
"dependencies": {
"@mdx-js/react": "^3.1.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-remdx/__tests__/plugin.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from 'vitest';
import { expect, test } from '@voidzero-dev/vite-plus/test';
import remdx from '../index.ts';

const { transform } = remdx();
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-remdx/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { PluginOption } from 'vite';
import type { PluginOption } from '@voidzero-dev/vite-plus';

export default function remdx(): PluginOption;
2 changes: 1 addition & 1 deletion packages/vite-plugin-remdx/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { basename } from 'node:path';
import { compile, CompileOptions, nodeTypes } from '@mdx-js/mdx';
import type { Plugin } from '@voidzero-dev/vite-plus';
import matter from 'gray-matter';
import normalizeNewline from 'normalize-newline';
import rehypeRaw from 'rehype-raw';
import shikiTwoslash, { setupForFile } from 'remark-shiki-twoslash';
import type { Plugin } from 'vite';
import ColorReplacements from './lib/ColorReplacements.tsx';

type Slide = [string, Record<string, unknown>];
Expand Down
5 changes: 3 additions & 2 deletions packages/vite-plugin-remdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"main": "index.mjs",
"module": "./index.mjs",
"scripts": {
"build": "rm -f index.mjs; tsdown index.ts --outDir=./ --clean=false --target=node22 --format=esm -dts"
"build": "rm -f index.mjs; vite lib index.ts --outDir=./ --clean=false --target=node22 --format=esm -dts"
},
"dependencies": {
"@mdx-js/mdx": "^3.1.1",
Expand All @@ -21,6 +21,7 @@
"remark-shiki-twoslash": "^3.1.3"
},
"devDependencies": {
"vite": "^7.2.0"
"@voidzero-dev/vite-plus": "catalog:",
"vite": "catalog:"
}
}
Loading