Skip to content

Commit 85390f2

Browse files
committed
chore: update package version to 0.1.1, change main entry point to src/index.ts, and remove build step from workflows
1 parent 9825f93 commit 85390f2

5 files changed

Lines changed: 8 additions & 78 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ jobs:
2525
- name: Install dependencies
2626
run: bun install
2727

28-
- name: Build package
29-
run: bun run build
30-
3128
- name: Setup Node.js
3229
uses: actions/setup-node@v4
3330
with:

.github/workflows/test.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,41 +42,3 @@ jobs:
4242
flags: unittests
4343
name: codecov-umbrella
4444
fail_ci_if_error: false
45-
46-
lint:
47-
name: Lint
48-
runs-on: ubuntu-latest
49-
50-
steps:
51-
- name: Checkout code
52-
uses: actions/checkout@v4
53-
54-
- name: Setup Bun
55-
uses: oven-sh/setup-bun@v2
56-
with:
57-
bun-version: latest
58-
59-
- name: Install dependencies
60-
run: bun install
61-
62-
- name: Run linter
63-
run: bun run lint
64-
65-
build:
66-
name: Build
67-
runs-on: ubuntu-latest
68-
69-
steps:
70-
- name: Checkout code
71-
uses: actions/checkout@v4
72-
73-
- name: Setup Bun
74-
uses: oven-sh/setup-bun@v2
75-
with:
76-
bun-version: latest
77-
78-
- name: Install dependencies
79-
run: bun install
80-
81-
- name: Build project
82-
run: bun run build

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{
22
"name": "zip-bun",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "A high-performance zip archive library for Bun with native C bindings",
5-
"main": "dist/index.js",
6-
"module": "dist/index.js",
7-
"types": "dist/index.d.ts",
5+
"main": "src/index.ts",
86
"type": "module",
97
"files": [
10-
"dist"
8+
"src"
119
],
1210
"scripts": {
13-
"build": "bun scripts/build.ts",
1411
"test": "bun test",
1512
"test:coverage": "bun test --coverage"
1613
},

scripts/build.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { cc, ptr, read } from "bun:ffi";
22

3-
import { content } from './zip_wrapper' with { type: 'macro' };
3+
import { join } from "node:path";
44

5-
const zipSource = content();
5+
const includePath = import.meta.dir;
6+
const wrapperPath = join(includePath, "zip_wrapper.c");
67

78
// Compile the C code with all the zip functions
89
const {
@@ -20,7 +21,8 @@ const {
2021
free_extracted_data,
2122
},
2223
} = cc({
23-
source: zipSource,
24+
source: wrapperPath,
25+
include: [includePath],
2426
symbols: {
2527
create_zip: {
2628
args: ["cstring"],

0 commit comments

Comments
 (0)