Skip to content

Commit

Permalink
Merge branch 'main' into pr/patzick/321
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 13, 2024
2 parents 9c61054 + 0a04675 commit ca1decc
Show file tree
Hide file tree
Showing 104 changed files with 8,512 additions and 16,598 deletions.
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@ea32e3a12414e6d3183163c3424a7d7a8631ad84
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
with:
commit-message: 'chore: apply automated lint fixes'
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,34 @@ 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"
- run: pnpm install
- run: pnpm lint
- run: pnpm test:types
- run: pnpm build
- run: pnpm vitest --coverage
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
- 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 --publishTag 2x
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ tmp
__*
.vercel
.netlify
test/fs-storage/**
170 changes: 170 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,176 @@

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.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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Unstorage provides an async Key-Value storage API with conventional features lik
- Binary and raw value support
- State [snapshots](https://unstorage.unjs.io/getting-started/utils#snapshots) and hydration
- Storage watcher
- HTTP Storage with [built-in server](https://unstorage.unjs.io/getting-started/http-server)
- HTTP Storage with [built-in server](https://unstorage.unjs.io/guide/http-server)

## Usage

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"],
});
2 changes: 1 addition & 1 deletion demo/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default defineConfig({
configureServer(server) {
const storage = createStorage();
const storageServer = createStorageServer(storage);
// eslint-disable-next-line unicorn/prefer-module

storage.mount("/src", fsdriver({ base: resolve(__dirname, "..") }));
server.middlewares.use("/storage", storageServer.handle);
},
Expand Down
47 changes: 47 additions & 0 deletions docs/.config/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# yaml-language-server: $schema=https://unpkg.com/undocs/schema/config.json
name: unstorage
shortDescription: Universal Key-Value.
description: Unified key-value storage API with conventional features and 20+ built-in drivers.
github: unjs/unstorage
themeColor: amber
url: https://unstorage.unjs.io
redirects:
"/usage": "/getting-started/usage"
"/utils": "/getting-started/utils"
"/http-server": "/getting-started/http-server"
"/custom-driver": "/getting-started/custom-driver"
"/drivers/azure-app-configuration": "/divers/azure"
"/drivers/azure-cosmos": "/divers/azure"
"/drivers/azure-key-vault": "/divers/azure"
"/drivers/azure-storage-block": "/divers/azure"
"/drivers/azure-storage-table": "/divers/azure"
"/drivers/cloudflare-kv-binding": "/drivers/cloudflare"
"/drivers/cloudflare-kv-http": "/drivers/cloudflare"
"/drivers/cloudflare-r2-binding": "/drivers/cloudflare"
"/drivers/vercel-kv": "/drivers/vercel"
"/drivers/netlify-blobs": "/drivers/netlify"
"/drivers/localstorage": "/drivers/browser"
"/drivers/indexedb": "/drivers/browser"
"/drivers/session-storage": "/drivers/browser"
landing:
contributors: true
featuresTitle: A simple, small, and fast key-value storage library for JavaScript.
features:
- title: "Runtime Agnostic"
description: "Your code will work on any JavaScript runtime including Node.js, Bun, Deno and Workers."
icon: "i-material-symbols-lock-open-right-outline-rounded"
- title: "Built-in drivers"
description: "Unstorage is shipped with 20+ built-in drivers for different platforms: Memory (default), FS, Redis, Memory, MongoDB, CloudFlare, GitHub, etc."
icon: "i-material-symbols-usb"
- title: "Snapshots"
description: "Expand your server and add capabilities. Your codebase will scale with your project."
icon: "i-material-symbols-add-a-photo-outline"
- title: "Multi Storages"
description: "Unix-style driver mounting to combine storages on different mounts."
icon: "i-material-symbols-view-list-outline"
- title: "JSON friendly"
description: "Unstorage automatically serializes and deserializes JSON values."
icon: "i-material-symbols-magic-button"
- title: "Binary Support"
description: "Store binary and raw data like images, videos, audio files, etc."
icon: "i-material-symbols-audio-file"
File renamed without changes
2 changes: 0 additions & 2 deletions docs/.npmrc

This file was deleted.

Loading

0 comments on commit ca1decc

Please sign in to comment.