Skip to content

Commit 17d8e44

Browse files
Revamp (#1)
* revamp * chore: release setup * fix: pipeline * Potential fix for code scanning alert no. 3: Incomplete string escaping or encoding Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix: code scan fixes * security update * auditing * adjustments * test fix --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 18479f6 commit 17d8e44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+9700
-2342
lines changed

.audit-ci.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"allowlist": [
3+
"GHSA-67mh-4wv8-2f99"
4+
],
5+
"high": true,
6+
"moderate": false,
7+
"low": false,
8+
"package-manager": "pnpm",
9+
"report-type": "important",
10+
"skip-dev": false,
11+
"licenses": {
12+
"allowlist": [
13+
"MIT",
14+
"Apache-2.0",
15+
"BSD-2-Clause",
16+
"BSD-3-Clause",
17+
"ISC",
18+
"BlueOak-1.0.0",
19+
"CC0-1.0",
20+
"0BSD",
21+
"CC-BY-4.0"
22+
],
23+
"excludePackages": [
24+
25+
]
26+
}
27+
}

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@changesets/get-github-info",
5+
{
6+
"repo": "leka74/easythread"
7+
}
8+
],
9+
"commit": false,
10+
"fixed": [],
11+
"linked": [],
12+
"access": "public",
13+
"baseBranch": "main",
14+
"updateInternalDependencies": "patch",
15+
"ignore": [
16+
"@easythread/example-*"
17+
]
18+
}

.changeset/initial-release.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
"@easythread/core": major
3+
"@easythread/vite": major
4+
"@easythread/rollup": major
5+
"@easythread/esbuild": major
6+
---
7+
8+
🎉 Initial release of easythread monorepo!
9+
10+
### Features
11+
12+
- **Multi-environment support**: Browser (Web Workers) + Node.js (Worker Threads)
13+
- **Multi-bundler compatibility**: Vite, Rollup, ESBuild plugins
14+
- **TypeScript support**: Full AST transformation with babel
15+
- **Smart import resolution**: Dynamic imports with ES/CJS compatibility
16+
- **External variable passing**: Seamless variable injection into worker contexts
17+
- **Enhanced error handling**: Comprehensive error categorization and contextual messages
18+
19+
### Packages
20+
21+
- `@easythread/core` - Core transformer and strategies
22+
- `@easythread/vite` - Vite plugin for automatic Web Worker generation
23+
- `@easythread/rollup` - Rollup plugin for Node.js Worker Thread generation
24+
- `@easythread/esbuild` - ESBuild plugin for fast builds
25+
26+
### Testing
27+
28+
- 57 comprehensive unit tests covering all core functionality
29+
- Full CI/CD pipeline with automated testing and publishing
30+
- Multi-Node.js version compatibility (18, 20, 22)
31+
32+
This release represents a production-ready solution for transforming functions to run in workers across multiple bundlers and environments.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Bug Report
2+
description: Report a bug or issue with easythread
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug! Please fill out the form below to help us investigate.
10+
11+
- type: dropdown
12+
id: package
13+
attributes:
14+
label: Package
15+
description: Which package is affected?
16+
options:
17+
- "@easythread/core"
18+
- "@easythread/vite"
19+
- "@easythread/rollup"
20+
- "@easythread/esbuild"
21+
- "Examples"
22+
- "Documentation"
23+
- "Other"
24+
validations:
25+
required: true
26+
27+
- type: dropdown
28+
id: environment
29+
attributes:
30+
label: Environment
31+
description: What environment are you using?
32+
options:
33+
- "Browser (Web Workers)"
34+
- "Node.js (Worker Threads)"
35+
- "Both"
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: description
41+
attributes:
42+
label: Bug Description
43+
description: A clear and concise description of what the bug is.
44+
placeholder: Describe the bug...
45+
validations:
46+
required: true
47+
48+
- type: textarea
49+
id: reproduction
50+
attributes:
51+
label: Steps to Reproduce
52+
description: Steps to reproduce the behavior
53+
placeholder: |
54+
1. Create a function with '/** @easythread */'
55+
2. Call the function
56+
3. See error
57+
validations:
58+
required: true
59+
60+
- type: textarea
61+
id: expected
62+
attributes:
63+
label: Expected Behavior
64+
description: What you expected to happen
65+
validations:
66+
required: true
67+
68+
- type: textarea
69+
id: actual
70+
attributes:
71+
label: Actual Behavior
72+
description: What actually happened
73+
validations:
74+
required: true
75+
76+
- type: textarea
77+
id: code
78+
attributes:
79+
label: Code Example
80+
description: Please provide a minimal code example that reproduces the issue
81+
render: typescript
82+
validations:
83+
required: false
84+
85+
- type: textarea
86+
id: environment-info
87+
attributes:
88+
label: Environment Information
89+
description: |
90+
Please provide version information:
91+
placeholder: |
92+
- Node.js version:
93+
- Package version:
94+
- Bundler (Vite/Rollup/ESBuild):
95+
- OS:
96+
validations:
97+
required: true
98+
99+
- type: textarea
100+
id: logs
101+
attributes:
102+
label: Error Logs
103+
description: Please paste any error logs or stack traces
104+
render: shell
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement for easythread
3+
title: "[Feature]: "
4+
labels: ["enhancement", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a feature! Please describe your idea below.
10+
11+
- type: dropdown
12+
id: package
13+
attributes:
14+
label: Package
15+
description: Which package would this feature affect?
16+
options:
17+
- "@easythread/core"
18+
- "@easythread/vite"
19+
- "@easythread/rollup"
20+
- "@easythread/esbuild"
21+
- "New Package"
22+
- "Documentation"
23+
- "Other"
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: problem
29+
attributes:
30+
label: Problem Description
31+
description: What problem does this feature solve?
32+
placeholder: I'm always frustrated when...
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: solution
38+
attributes:
39+
label: Proposed Solution
40+
description: What would you like to see implemented?
41+
placeholder: I would like to see...
42+
validations:
43+
required: true
44+
45+
- type: textarea
46+
id: alternatives
47+
attributes:
48+
label: Alternatives Considered
49+
description: What alternatives have you considered?
50+
validations:
51+
required: false
52+
53+
- type: textarea
54+
id: examples
55+
attributes:
56+
label: Code Examples
57+
description: Please provide examples of how this feature would be used
58+
render: typescript
59+
validations:
60+
required: false
61+
62+
- type: checkboxes
63+
id: breaking
64+
attributes:
65+
label: Breaking Changes
66+
description: Would this feature require breaking changes?
67+
options:
68+
- label: This feature would require breaking changes
69+
required: false
70+
71+
- type: textarea
72+
id: additional
73+
attributes:
74+
label: Additional Context
75+
description: Any additional context or information about the feature request

.github/dependabot.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm (pnpm uses package.json)
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "09:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "@leke"
13+
assignees:
14+
- "@leke"
15+
commit-message:
16+
prefix: "chore"
17+
include: "scope"
18+
labels:
19+
- "dependencies"
20+
- "automated"
21+
22+
# Monitor packages/core
23+
- package-ecosystem: "npm"
24+
directory: "/packages/core"
25+
schedule:
26+
interval: "weekly"
27+
day: "monday"
28+
time: "09:00"
29+
open-pull-requests-limit: 5
30+
labels:
31+
- "dependencies"
32+
- "core"
33+
34+
# Monitor packages/vite-plugin
35+
- package-ecosystem: "npm"
36+
directory: "/packages/vite-plugin"
37+
schedule:
38+
interval: "weekly"
39+
day: "monday"
40+
time: "09:00"
41+
open-pull-requests-limit: 5
42+
labels:
43+
- "dependencies"
44+
- "vite-plugin"
45+
46+
# Monitor packages/rollup-plugin
47+
- package-ecosystem: "npm"
48+
directory: "/packages/rollup-plugin"
49+
schedule:
50+
interval: "weekly"
51+
day: "monday"
52+
time: "09:00"
53+
open-pull-requests-limit: 5
54+
labels:
55+
- "dependencies"
56+
- "rollup-plugin"
57+
58+
# Monitor packages/esbuild-plugin
59+
- package-ecosystem: "npm"
60+
directory: "/packages/esbuild-plugin"
61+
schedule:
62+
interval: "weekly"
63+
day: "monday"
64+
time: "09:00"
65+
open-pull-requests-limit: 5
66+
labels:
67+
- "dependencies"
68+
- "esbuild-plugin"
69+
70+
# GitHub Actions workflow dependencies
71+
- package-ecosystem: "github-actions"
72+
directory: "/"
73+
schedule:
74+
interval: "weekly"
75+
day: "monday"
76+
time: "09:00"
77+
open-pull-requests-limit: 5
78+
labels:
79+
- "dependencies"
80+
- "github-actions"

0 commit comments

Comments
 (0)