diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index ae86553..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [avoidwork] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 0fbd92b..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -name: Bug Report -about: Report a bug or unexpected behavior -title: "fix: " -labels: "bug" -assignees: "" ---- - -## Summary - - -## Reproduction - -1. -2. -3. - -## Expected Behavior - - -## Actual Behavior - - -## Environment -- **Node.js version**: -- **OS**: -- **filesize.js version**: - -## Code Sample - - -```javascript -// Your code here -``` - -## Additional Context - diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 3e1e11c..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Feature Request -about: Suggest a new feature or enhancement -title: "feat: " -labels: "enhancement" -assignees: "" ---- - -## Summary - - -## Motivation - - -## Proposed Solution - - -## Example Usage - - -```javascript -// Your code here -``` - -## Alternatives Considered - - -## Additional Context - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 338a798..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,32 +0,0 @@ -## Summary - - -## Type of Change - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature / enhancement -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] Documentation update -- [ ] Build / dependency / tooling change -- [ ] Test additions or updates -- [ ] Other - -## Related Issues - - -## Testing - - -## Checklist - -- [ ] `npm test` passes -- [ ] `npm run build` succeeds -- [ ] 100% test coverage maintained -- [ ] No hardcoded secrets or credentials introduced -- [ ] Zero external dependencies added -- [ ] ES Modules only (no CommonJS in src/) -- [ ] JSDoc comments added/updated -- [ ] CHANGELOG.md updated (if applicable) - -## Screenshots (if applicable) - diff --git a/.github/SECURITY.md b/.github/SECURITY.md deleted file mode 100644 index c35a7e8..0000000 --- a/.github/SECURITY.md +++ /dev/null @@ -1,61 +0,0 @@ -# Security Policy - -## Supported Versions - -Only the latest major version receives security updates. - -| Version | Supported | -| ------- | ------------------ | -| 6.x | :white_check_mark: | -| < 6.0 | :x: | - -## Reporting a Vulnerability - -We take security seriously. If you discover a security vulnerability, please report it responsibly. - -### How to Report - -1. **Do not** open a public issue -2. Email security findings to the maintainers -3. Include: - - Description of the vulnerability - - Steps to reproduce - - Potential impact - - Suggested fix (if any) - -### What to Expect - -- **Acknowledgment**: Within 48 hours -- **Assessment**: Within 1 week -- **Fix timeline**: Depends on severity - - Critical: Immediate patch - - High: Within 30 days - - Medium/Low: Next release cycle - -### Scope - -This policy covers: -- Code execution vulnerabilities -- Data corruption or loss -- Authentication/authorization bypass -- Prototype pollution -- Dependency vulnerabilities affecting the core - -### Safe Harbors - -We will not take legal action against security researchers who: -- Follow this responsible disclosure process -- Make reasonable efforts to privacy and data protection -- Keep vulnerabilities confidential until patched - -## Security Best Practices - -When using filesize.js: -- Always validate input data before passing to filesize() -- Keep dependencies updated -- Use the latest stable version -- Review changelog for security-related updates - -## Known Issues - -No known security issues at this time. diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 02ae4b7..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: - - package-ecosystem: github-actions - directory: "/" - schedule: - interval: weekly - open-pull-requests-limit: 10 - - package-ecosystem: npm - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 8fe7dbf..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -name: ci - -on: - pull_request: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [24.x] - - steps: - - name: Checkout Repository - uses: actions/checkout@v7 - with: - fetch-depth: 1 - - - name: Setup Node ${{ matrix.node-version }} - uses: actions/setup-node@v7 - with: - always-auth: false - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm install - - - name: Build - run: npm run build - - - name: Run Tests - run: npm test - - automerge: - needs: build - runs-on: ubuntu-latest - permissions: - pull-requests: write - contents: write - steps: - - uses: fastify/github-action-merge-dependabot@v3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 3200b01..dc03eaf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ -.husky -node_modules -.idea -coverage +node_modules/* +.idea/* \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index 4ecdc92..0000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env sh -npm run build && npm run coverage diff --git a/.opencode/commands/opsx-apply.md b/.opencode/commands/opsx-apply.md deleted file mode 100644 index 16d2ef3..0000000 --- a/.opencode/commands/opsx-apply.md +++ /dev/null @@ -1,149 +0,0 @@ ---- -description: Implement tasks from an OpenSpec change (Experimental) ---- - -Implement tasks from an OpenSpec change. - -**Input**: Optionally specify a change name (e.g., `/opsx-apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes. - -**Steps** - -1. **Select the change** - - If a name is provided, use it. Otherwise: - - Infer from conversation context if the user mentioned a change - - Auto-select if only one active change exists - - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select - - Always announce: "Using change: " and how to override (e.g., `/opsx-apply `). - -2. **Check status to understand the schema** - ```bash - openspec status --change "" --json - ``` - Parse the JSON to understand: - - `schemaName`: The workflow being used (e.g., "spec-driven") - - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others) - -3. **Get apply instructions** - - ```bash - openspec instructions apply --change "" --json - ``` - - This returns: - - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema) - - Progress (total, complete, remaining) - - Task list with status - - Dynamic instruction based on current state - - **Handle states:** - - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx-continue` - - If `state: "all_done"`: congratulate, suggest archive - - Otherwise: proceed to implementation - -4. **Read context files** - - Read every file path listed under `contextFiles` from the apply instructions output. - The files depend on the schema being used: - - **spec-driven**: proposal, specs, design, tasks - - Other schemas: follow the contextFiles from CLI output - -5. **Show current progress** - - Display: - - Schema being used - - Progress: "N/M tasks complete" - - Remaining tasks overview - - Dynamic instruction from CLI - -6. **Implement tasks (loop until done or blocked)** - - For each pending task: - - Show which task is being worked on - - Make the code changes required - - Keep changes minimal and focused - - Mark task complete in the tasks file: `- [ ]` → `- [x]` - - Continue to next task - - **Pause if:** - - Task is unclear → ask for clarification - - Implementation reveals a design issue → suggest updating artifacts - - Error or blocker encountered → report and wait for guidance - - User interrupts - -7. **On completion or pause, show status** - - Display: - - Tasks completed this session - - Overall progress: "N/M tasks complete" - - If all done: suggest archive - - If paused: explain why and wait for guidance - -**Output During Implementation** - -``` -## Implementing: (schema: ) - -Working on task 3/7: -[...implementation happening...] -✓ Task complete - -Working on task 4/7: -[...implementation happening...] -✓ Task complete -``` - -**Output On Completion** - -``` -## Implementation Complete - -**Change:** -**Schema:** -**Progress:** 7/7 tasks complete ✓ - -### Completed This Session -- [x] Task 1 -- [x] Task 2 -... - -All tasks complete! You can archive this change with `/opsx-archive`. -``` - -**Output On Pause (Issue Encountered)** - -``` -## Implementation Paused - -**Change:** -**Schema:** -**Progress:** 4/7 tasks complete - -### Issue Encountered - - -**Options:** -1.