Skip to content

Commit 1047a6e

Browse files
committed
release 0.0.1
1 parent 00f280f commit 1047a6e

File tree

5 files changed

+16
-38
lines changed

5 files changed

+16
-38
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
paths:
8-
- "package.json"
97

108
# Required permissions for npm provenance and GitHub releases
119
permissions:
@@ -37,7 +35,7 @@ jobs:
3735
echo "Current version in package.json: $CURRENT_VERSION"
3836
3937
# Get published version from npm (if it exists)
40-
PUBLISHED_VERSION=$(npm view vite-plugin-native-modules version 2>/dev/null || echo "none")
38+
PUBLISHED_VERSION=$(npm view vite-plugin-v8-bytecode version 2>/dev/null || echo "none")
4139
echo "Published version on npm: $PUBLISHED_VERSION"
4240
4341
# Compare versions
@@ -94,10 +92,15 @@ jobs:
9492
- name: Build
9593
run: yarn build
9694

97-
- name: Publish to npm with provenance
95+
# IMPORTANT: npm >= 11.5.1 and npm publish, not yarn npm publish
96+
- name: Ensure recent npm for trusted publishing
97+
run: npm install -g npm@latest
98+
99+
- name: Verify npm version
100+
run: npm --version
101+
102+
- name: Publish to npm via trusted publisher
98103
run: npm publish --provenance --access public
99-
env:
100-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
101104

102105
- name: Create GitHub Release
103106
uses: softprops/action-gh-release@v2

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ A Vite plugin that compiles JavaScript to V8 bytecode for Node.js and Electron a
1515
- 📦 **Works with Node.js & Electron** - Compatible with both runtimes
1616
- 🛠️ **Production Only** - Automatically disabled in development for faster builds
1717

18-
## Requirements
19-
20-
- Node.js 22 or newer
21-
- Vite 3.0+
22-
- CommonJS output format (CJS)
23-
2418
## Installation
2519

2620
```bash
@@ -213,11 +207,3 @@ This plugin is inspired by:
213207
## License
214208

215209
MIT
216-
217-
## Contributing
218-
219-
Contributions are welcome! Please feel free to submit a Pull Request.
220-
221-
## Support
222-
223-
For issues, questions, or feature requests, please [open an issue](https://github.com/biw/vite-plugin-v8-bytecode/issues) on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vite-plugin-v8-bytecode",
3-
"version": "0.0.0-pre.1",
4-
"description": "A Vite plugin for integrating V8 bytecode into your Vite project",
3+
"version": "0.0.1",
4+
"description": "A Vite plugin for compiling JavaScript to V8 bytecode for Node.js and Electron applications",
55
"author": "Ben Williams",
66
"license": "MIT",
77
"homepage": "https://github.com/biw/vite-plugin-v8-bytecode",
@@ -51,8 +51,7 @@
5151
},
5252
"dependencies": {
5353
"@babel/core": "^7.28.5",
54-
"magic-string": "^0.30.21",
55-
"picocolors": "^1.1.1"
54+
"magic-string": "^0.30.21"
5655
},
5756
"devDependencies": {
5857
"@babel/types": "^7.28.5",

src/index.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from "node:path";
2-
import colors from "picocolors";
32
import type { Plugin, Logger } from "vite";
43
import MagicString from "magic-string";
54
import type { SourceMapInput, OutputChunk } from "rollup";
@@ -92,9 +91,7 @@ export function bytecodePlugin(options: BytecodeOptions = {}): Plugin | null {
9291
(p) => p.name === "vite:electron-renderer-preset-config"
9392
);
9493
if (useInRenderer) {
95-
config.logger.warn(
96-
colors.yellow("bytecodePlugin does not support renderer.")
97-
);
94+
config.logger.warn("bytecodePlugin does not support renderer.");
9895
return;
9996
}
10097

@@ -112,10 +109,8 @@ export function bytecodePlugin(options: BytecodeOptions = {}): Plugin | null {
112109

113110
if (output.format === "es") {
114111
config.logger.warn(
115-
colors.yellow(
116-
"bytecodePlugin does not support ES module output format. " +
117-
'Please set "build.rollupOptions.output.format" to "cjs".'
118-
)
112+
"bytecodePlugin does not support ES module output format. " +
113+
'Please set "build.rollupOptions.output.format" to "cjs".'
119114
);
120115
}
121116

@@ -293,11 +288,7 @@ export function bytecodePlugin(options: BytecodeOptions = {}): Plugin | null {
293288
const bytecodeChunkCount = Object.keys(output).filter((chunk) =>
294289
bytecodeChunkExtensionRE.test(chunk)
295290
).length;
296-
logger.info(
297-
`${colors.green(
298-
`✓`
299-
)} ${bytecodeChunkCount} chunks compiled into bytecode.`
300-
);
291+
logger.info(`✓ ${bytecodeChunkCount} chunks compiled into bytecode.`);
301292
}
302293
},
303294
};

yarn.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3728,7 +3728,6 @@ __metadata:
37283728
electron: "npm:^39.1.0"
37293729
eslint: "npm:9.39.1"
37303730
magic-string: "npm:^0.30.21"
3731-
picocolors: "npm:^1.1.1"
37323731
tsup: "npm:8.5.0"
37333732
typescript: "npm:5.9.3"
37343733
typescript-eslint: "npm:8.46.3"

0 commit comments

Comments
 (0)