Skip to content

Commit

Permalink
Merge branch 'main' into pr/becem-gharbi/361
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 16, 2024
2 parents 6540535 + 6163be0 commit a0189cf
Show file tree
Hide file tree
Showing 143 changed files with 10,942 additions and 16,670 deletions.
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
VITE_UPSTASH_REDIS_REST_URL=
VITE_UPSTASH_REDIS_REST_TOKEN=

VITE_VERCEL_BLOB_READ_WRITE_TOKEN=

VITE_CLOUDFLARE_ACC_ID=
VITE_CLOUDFLARE_KV_NS_ID=
VITE_CLOUDFLARE_TOKEN=
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

9 changes: 0 additions & 9 deletions .eslintrc

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: "pnpm"
- run: pnpm install
- name: Fix lint issues
run: pnpm run lint:fix
- uses: autofix-ci/action@bee19d72e71787c12ca0f29de72f2833e437e4c9
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
with:
commit-message: 'chore: apply automated lint fixes'
29 changes: 27 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,44 @@ on:
branches:
- main

permissions:
id-token: write

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: "pnpm"
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- run: pnpm install
- run: pnpm lint
- run: pnpm test:types
- run: pnpm build
- run: pnpm vitest --coverage
- uses: codecov/codecov-action@v3
env:
VITE_UPSTASH_REDIS_REST_URL: ${{ secrets.VITE_UPSTASH_REDIS_REST_URL }}
VITE_UPSTASH_REDIS_REST_TOKEN: ${{ secrets.VITE_UPSTASH_REDIS_REST_TOKEN }}
VITE_VERCEL_BLOB_READ_WRITE_TOKEN: ${{ secrets.VITE_VERCEL_BLOB_READ_WRITE_TOKEN }}
VITE_CLOUDFLARE_ACC_ID: ${{ secrets.VITE_CLOUDFLARE_ACC_ID }}
VITE_CLOUDFLARE_KV_NS_ID: ${{ secrets.VITE_CLOUDFLARE_KV_NS_ID }}
VITE_CLOUDFLARE_TOKEN: ${{ secrets.VITE_CLOUDFLARE_TOKEN }}
- uses: codecov/codecov-action@v5
- name: nightly release
if: |
github.event_name == 'push' &&
!startsWith(github.event.head_commit.message, 'docs')
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc &&
pnpm changelogen --canary nightly --publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ tmp
__*
.vercel
.netlify
playground
.env
test/fs-storage/**
.env
.wrangler
220 changes: 220 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,226 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## v1.13.1

[compare changes](https://github.com/unjs/unstorage/compare/v1.13.0...v1.13.1)

### 🩹 Fixes

- Revert chokidar to v3 ([#502](https://github.com/unjs/unstorage/pull/502))

### ❤️ Contributors

- Pooya Parsa ([@pi0](http://github.com/pi0))

## v1.13.0

[compare changes](https://github.com/unjs/unstorage/compare/v1.12.0...v1.13.0)

### 🚀 Enhancements

- Bump chokidar v4 ([#489](https://github.com/unjs/unstorage/pull/489))
- Add `null` driver ([#495](https://github.com/unjs/unstorage/pull/495))

### 🩹 Fixes

- **cloudflare-kv:** Use min ttl of 60 seconds ([#496](https://github.com/unjs/unstorage/pull/496))

### 💅 Refactors

- **netlify:** Support @netlify/blobs v8 and improve options types ([#486](https://github.com/unjs/unstorage/pull/486))
- **cli:** Migrate to `citty` ([#498](https://github.com/unjs/unstorage/pull/498))

### 📖 Documentation

- Missing values return null, not undefined ([#487](https://github.com/unjs/unstorage/pull/487))

### 🏡 Chore

- Update eslint config ([3dddf6c](https://github.com/unjs/unstorage/commit/3dddf6c))
- Update deps ([ee70d15](https://github.com/unjs/unstorage/commit/ee70d15))
- Update lockfile ([dca8dc9](https://github.com/unjs/unstorage/commit/dca8dc9))
- Revert msw back to 1.x ([cf7f3ce](https://github.com/unjs/unstorage/commit/cf7f3ce))

### ❤️ Contributors

- Alexander <[email protected]>
- Pooya Parsa ([@pi0](http://github.com/pi0))
- ToBinio ([@ToBinio](http://github.com/ToBinio))
- V1rtl ([@talentlessguy](http://github.com/talentlessguy))
- Philippe Serhal ([@serhalp](http://github.com/serhalp))
- Renato Lacerda <[email protected]>

## v1.12.0

[compare changes](https://github.com/unjs/unstorage/compare/v1.11.1...v1.12.0)

### 🚀 Enhancements

- **http, server:** Support native `ttl` ([#479](https://github.com/unjs/unstorage/pull/479))

### 🏡 Chore

- Update undocs ([0e2ea33](https://github.com/unjs/unstorage/commit/0e2ea33))
- Update undocs ([a711c1b](https://github.com/unjs/unstorage/commit/a711c1b))
- Update undocs ([f27c389](https://github.com/unjs/unstorage/commit/f27c389))

### 🤖 CI

- Setup nightly release ([258fd4a](https://github.com/unjs/unstorage/commit/258fd4a))
- Fetch full history to preserve nightly changelog ([329ff2b](https://github.com/unjs/unstorage/commit/329ff2b))

### ❤️ Contributors

- Pooya Parsa ([@pi0](http://github.com/pi0))

## v1.11.1

[compare changes](https://github.com/unjs/unstorage/compare/v1.11.0...v1.11.1)

### 🔥 Performance

- **cloudflare-kv-binding:** Add missing base argument on `getKeys` ([#475](https://github.com/unjs/unstorage/pull/475))

### ❤️ Contributors

- Sébastien Chopin ([@atinux](http://github.com/atinux))

## v1.11.0

[compare changes](https://github.com/unjs/unstorage/compare/v1.10.2...v1.11.0)

### 🚀 Enhancements

- Add `keys`, `get`, `set`, `has` and `del` aliases ([#402](https://github.com/unjs/unstorage/pull/402))
- Expose underlying client instance ([#446](https://github.com/unjs/unstorage/pull/446))
- **cloudflare-kv-binding:** Support `ttl` for `setItem` ([#470](https://github.com/unjs/unstorage/pull/470))
- **cloudflare-kv-http:** Support `ttl` for `setItem` ([#448](https://github.com/unjs/unstorage/pull/448))

### 🔥 Performance

- **getKeys:** Avoid duplicate iteration ([#386](https://github.com/unjs/unstorage/pull/386))
- Use direct array access instead of `endsWIth` ([#387](https://github.com/unjs/unstorage/pull/387))

### 🩹 Fixes

- **cloudflare-kv-binding:** Allow passing transaction options for `setItem` to `binding.put` ([#423](https://github.com/unjs/unstorage/pull/423))
- Fix driver types ([#433](https://github.com/unjs/unstorage/pull/433))
- **server:** Avoid decoding raw request body ([#434](https://github.com/unjs/unstorage/pull/434))
- **cloudflare-kv-binding:** Go through all pages to list the keys ([#459](https://github.com/unjs/unstorage/pull/459))

### 📖 Documentation

- Using undocs package manager component ([#414](https://github.com/unjs/unstorage/pull/414))
- Fix link ([#429](https://github.com/unjs/unstorage/pull/429))
- Fix typographical errors ([#432](https://github.com/unjs/unstorage/pull/432))
- Jsdocs for the server functions ([#438](https://github.com/unjs/unstorage/pull/438))
- Improve drivers ([f6f547e](https://github.com/unjs/unstorage/commit/f6f547e))

### 🏡 Chore

- **release:** V1.10.2 ([5e40ef4](https://github.com/unjs/unstorage/commit/5e40ef4))
- **docs:** Update lock ([7350385](https://github.com/unjs/unstorage/commit/7350385))
- Update undocs ([83c6696](https://github.com/unjs/unstorage/commit/83c6696))
- Update docs ([26e9d73](https://github.com/unjs/unstorage/commit/26e9d73))
- Update dependencies ([0b1aa9c](https://github.com/unjs/unstorage/commit/0b1aa9c))
- Update to eslint v9 ([7b8c51e](https://github.com/unjs/unstorage/commit/7b8c51e))
- Apply new lint rules ([be542fc](https://github.com/unjs/unstorage/commit/be542fc))
- Add benchmark script ([d84bcc6](https://github.com/unjs/unstorage/commit/d84bcc6))
- Add bench script ([d40c206](https://github.com/unjs/unstorage/commit/d40c206))
- Lint ([922ada9](https://github.com/unjs/unstorage/commit/922ada9))
- Update deps ([5eb2d7e](https://github.com/unjs/unstorage/commit/5eb2d7e))
- Update eslintrc ([60885f8](https://github.com/unjs/unstorage/commit/60885f8))

### 🤖 CI

- Update node to 20 ([5673278](https://github.com/unjs/unstorage/commit/5673278))

### ❤️ Contributors

- SolarisUp ([@SolarisUp](http://github.com/SolarisUp))
- Justin Barber ([@barberj](http://github.com/barberj))
- Pooya Parsa ([@pi0](http://github.com/pi0))
- Sébastien Chopin ([@atinux](http://github.com/atinux))
- Farnabaz <[email protected]>
- Hash Brown ([@xuzuodong](http://github.com/xuzuodong))
- Michael Brevard <[email protected]>
- Alexander Lichter ([@manniL](http://github.com/manniL))
- Rgehbt ([@Gehbt](http://github.com/Gehbt))
- Selemondev ([@selemondev](http://github.com/selemondev))
- Renato Lacerda <[email protected]>

## v1.10.2

[compare changes](https://github.com/unjs/unstorage/compare/v1.10.1...v1.10.2)

### 🩹 Fixes

- **http, server:** Handle missing resources with http 404 ([#367](https://github.com/unjs/unstorage/pull/367))
- **pkg:** Make `ioredis` dependency optional ([#410](https://github.com/unjs/unstorage/pull/410))
- **vercel-kv:** Add missing driver name ([#355](https://github.com/unjs/unstorage/pull/355))
- **setItems:** Call driver native `setItems` only to avoid duplicate write ([#392](https://github.com/unjs/unstorage/pull/392))
- `getItems`, `setItems` types ([#395](https://github.com/unjs/unstorage/pull/395))

### 💅 Refactors

- **cloudflare-kv, cloudflare-r2:** Move `getBindings` to utils and add default `BUCKET` for r2 ([#292](https://github.com/unjs/unstorage/pull/292))
- **netlify-blobs:** Update to v7 ([#407](https://github.com/unjs/unstorage/pull/407))

### 📖 Documentation

- **planetscale:** Correct `table` option name ([#359](https://github.com/unjs/unstorage/pull/359))
- **vercel-kv:** Fix typo ([#362](https://github.com/unjs/unstorage/pull/362))
- Refactor with `unjs-docs` and nuxt ui pro ([#374](https://github.com/unjs/unstorage/pull/374))
- Improvements ([a64e941](https://github.com/unjs/unstorage/commit/a64e941))
- Fix links and add redirects ([166498f](https://github.com/unjs/unstorage/commit/166498f))
- Update unjs-docs version and add redirects ([f2a408d](https://github.com/unjs/unstorage/commit/f2a408d))
- Fix typo in http-server ([#385](https://github.com/unjs/unstorage/pull/385))
- Update deps ([bfbf423](https://github.com/unjs/unstorage/commit/bfbf423))
- Update link ([#408](https://github.com/unjs/unstorage/pull/408))

### 📦 Build

- Update mkdist for cjs dist hotfix ([cae8533](https://github.com/unjs/unstorage/commit/cae8533))

### 🏡 Chore

- **release:** V1.10.1 ([7b9a8ad](https://github.com/unjs/unstorage/commit/7b9a8ad))
- **docs:** Update dependencies ([8a1f81c](https://github.com/unjs/unstorage/commit/8a1f81c))
- Update lockfile ([e63f16b](https://github.com/unjs/unstorage/commit/e63f16b))
- Update dependencies ([bb471c1](https://github.com/unjs/unstorage/commit/bb471c1))
- **docs:** Update lockfile ([9c5fe17](https://github.com/unjs/unstorage/commit/9c5fe17))
- Update lockfile ([fc9f6a9](https://github.com/unjs/unstorage/commit/fc9f6a9))
- Update docs ([f85112f](https://github.com/unjs/unstorage/commit/f85112f))
- Update docs ([f78ffc4](https://github.com/unjs/unstorage/commit/f78ffc4))
- Update lint script ([4d61c78](https://github.com/unjs/unstorage/commit/4d61c78))
- Update deps ([e48cb59](https://github.com/unjs/unstorage/commit/e48cb59))
- Update undocs ([8be788f](https://github.com/unjs/unstorage/commit/8be788f))
- Update vercel kv banner ([53d23e8](https://github.com/unjs/unstorage/commit/53d23e8))
- Update lockfile ([57e719c](https://github.com/unjs/unstorage/commit/57e719c))

### ✅ Tests

- Skip netlify-blobs for now ([75b2353](https://github.com/unjs/unstorage/commit/75b2353))
- **http:** Add tests for `null` value ([#365](https://github.com/unjs/unstorage/pull/365))

### ❤️ Contributors

- Pooya Parsa ([@pi0](http://github.com/pi0))
- Harlan Wilton ([@harlan-zw](http://github.com/harlan-zw))
- Matt Kane <[email protected]>
- Julius Marminge <[email protected]>
- Connor Pearson <[email protected]>
- Kongmoumou ([@kongmoumou](http://github.com/kongmoumou))
- Alex
- Sébastien Chopin ([@Atinux](http://github.com/Atinux))
- Skosh <[email protected]>
- Dominik Opyd <[email protected]>
- Arkadiusz Sygulski <[email protected]>
- Jan-Henrik Damaschke <[email protected]>
- Masious
- Boe Reh <[email protected]>

## v1.10.1

[compare changes](https://github.com/unjs/unstorage/compare/v1.10.0...v1.10.1)
Expand Down
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Unstorage provides an async Key-Value storage API with conventional features lik
- Tree-shakable utils and tiny core
- Auto JSON value serialization and deserialization
- Binary and raw value support
- State [snapshots](https://unstorage.unjs.io/utils#snapshots) and hydration
- State [snapshots](https://unstorage.unjs.io/getting-started/utils#snapshots) and hydration
- Storage watcher
- HTTP Storage with [built-in server](https://unstorage.unjs.io/http-server)
- HTTP Storage with [built-in server](https://unstorage.unjs.io/guide/http-server)

## Usage

Expand All @@ -51,6 +51,30 @@ await storage.getItem("foo:bar"); // or storage.getItem('/foo/bar')

👉 Check out the [the documentation](https://unstorage.unjs.io) for usage information.

## Nightly release channel

You can use the nightly release channel to try the latest changes in the `main` branch via [`unstorage-nightly`](https://www.npmjs.com/package/unstorage-nightly).

If directly using `unstorage` in your project:

```json
{
"devDependencies": {
"unstorage": "npm:unstorage-nightly"
}
}
```

If using `unstorage` via another tool in your project:

```json
{
"resolutions": {
"unstorage": "npm:unstorage-nightly"
}
}
```

## Contribution

- Clone repository
Expand Down
1 change: 1 addition & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ export default defineBuildConfig({
declaration: false,
},
],
externals: ["mongodb"],
});
Loading

0 comments on commit a0189cf

Please sign in to comment.