diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index c18b5f2..0000000 --- a/.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs -# http://editorconfig.org - -root = true - -[*] -indent_style = space -indent_size = 4 -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*{.yml}] -indent_size = 2 - -[*.md] -trim_trailing_whitespace = false -max_line_length = off diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 43a3b17..c3a3593 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,10 +5,16 @@ updates: directory: / rebase-strategy: auto schedule: - interval: "weekly" - allow: - - dependency-name: "*" - dependency-type: "production" + interval: weekly commit-message: - prefix: "feat(deps):" + prefix: "chore" + include: "scope" versioning-strategy: widen + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + commit-message: + prefix: "chore" + include: "scope" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d1a33ce..ec6fa75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,29 +14,26 @@ jobs: name: Release runs-on: ubuntu-latest permissions: - contents: write # to be able to publish a GitHub release - issues: write # to be able to comment on released issues + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues pull-requests: write # to be able to comment on released pull requests - id-token: write # to enable use of OIDC for npm provenance + id-token: write # to enable use of OIDC for npm provenance steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 # fetch all history - - name: Setup Node.js - uses: actions/setup-node@v4 + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@v1 with: - node-version: 22 + cache: true - - name: Install dependencies - run: npm ci - - - name: Run build - run: npm run build + - name: Build + run: vp pack - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release@^24 + run: npx semantic-release@^25 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 2ab4aa5..add67c6 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,24 +1,23 @@ -name: "Close stale issues and PRs" +name: Close stale issues and PRs on: schedule: - - cron: "0 0 * * *" + - cron: "0 0 * * *" jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-stale: 60 - days-before-close: 7 - stale-issue-message: > + - uses: actions/stale@v10 + with: + days-before-stale: 60 + days-before-close: 7 + stale-issue-message: > This issue has been automatically marked as stale because it has not had recent activity in the past 60 days. It will be closed within 7 days if no further activity occurs. If the issue persists please comment here to bump your issue. - Thank You - React Dropzone Maintaners - stale-pr-message: > + Thank You - React Dropzone Maintainers + stale-pr-message: > This PR has been automatically marked as stale because it has not had recent activity in the past 60 days. It will be closed within 7 days if no further activity occurs. If the issue persists please comment here to bump your issue. - Thank You - React Dropzone Maintaners - stale-issue-label: stale - stale-pr-label: stale + Thank You - React Dropzone Maintainers + stale-issue-label: stale + stale-pr-label: stale diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 63bf952..a8cb205 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,26 +15,23 @@ jobs: strategy: fail-fast: false matrix: - node-version: [14, 16, 18, 20, 22] + node-version: [22, 24] steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 - - name: Setup Node.js - uses: actions/setup-node@v4 + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@v1 with: node-version: ${{ matrix.node-version }} + cache: true - - name: Install compatible NPM version - if: matrix.node-version == 14 - run: npm install -g npm@^9 - - - name: Install dependencies - run: npm ci + - name: Check formatting, linting, and types + run: vp check - name: Run tests - run: npm run test:cov + run: vp test --coverage - name: Collect coverage uses: coverallsapp/github-action@v2 diff --git a/.gitignore b/.gitignore index 6f25dac..13277c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,8 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -## Node -# Logs -*.log -npm-debug.log* - -# Dependency directory -# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git node_modules - - -## OS X -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - - -## Direnv -.envrc - - -## Dist -coverage -build -docs dist -out-tsc -tmp +coverage +*.log +.DS_Store +!.vscode/ +!.vscode/settings.json +!.vscode/extensions.json diff --git a/.vite-hooks/pre-commit b/.vite-hooks/pre-commit new file mode 100755 index 0000000..85fb65b --- /dev/null +++ b/.vite-hooks/pre-commit @@ -0,0 +1 @@ +vp staged diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..46cef3b --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["VoidZero.vite-plus-extension-pack"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..255a111 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,22 @@ +{ + "npm.scriptRunner": "vp", + "editor.defaultFormatter": "oxc.oxc-vscode", + "[javascript]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "oxc.fmt.configPath": "./vite.config.ts", + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "file", + "editor.codeActionsOnSave": { + "source.fixAll.oxc": "explicit" + } +} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..362b82a --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,16 @@ + + +# Using Vite+, the Unified Toolchain for the Web + +This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp --help` for information about a specific command. + +Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/. + +## Review Checklist + +- [ ] Run `vp install` after pulling remote changes and before getting started. +- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes. +- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run