Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CachedValue and CachedFunction #41

Merged
merged 29 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
26a407c
First pass
fregante May 25, 2023
64a4301
Merge remote-tracking branch 'origin/main' into cache-item-api
fregante May 25, 2023
7cbce62
Merge remote-tracking branch 'origin/main' into cache-item-api
fregante May 25, 2023
528950b
Add tests for cache-item
fregante May 25, 2023
cfd43b3
Test `getCached`
fregante May 25, 2023
4fbdd01
Extract `UpdatableCacheItem`
fregante May 27, 2023
be5b662
Extract `updatable-cache-item` files
fregante May 27, 2023
6dc9619
Move files to /source/; rename index to legacy
fregante May 27, 2023
c1dd1c1
Allow direct legacy import
fregante May 27, 2023
6dc3272
Readme 1/?
fregante May 27, 2023
49ec410
Drop `cache.function`
fregante May 27, 2023
c366f57
Readme 2/2; change defaultCacheKey
fregante May 27, 2023
053c2b1
Extract 2 documentation files
fregante May 27, 2023
40e5571
Document legacy API
fregante May 27, 2023
f53584c
Document `UpdatableCacheItem` methods
fregante May 27, 2023
e46a20c
Update esm-lint.yml
fregante Jun 1, 2023
f8129f5
6.0.0-3
fregante Jun 7, 2023
373f22c
Rename to CachedValue/CachedFunction
fregante Jun 7, 2023
26731f6
CachedFunction.set -> applyOverride
fregante Jun 7, 2023
e0ca353
Fix exports map
fregante Jun 8, 2023
9689195
6.0.0-4
fregante Jun 8, 2023
ab3e147
Lint
fregante Jun 12, 2023
a1c560d
Fix TS eslint?
fregante Jun 12, 2023
da92031
Add failing test for
fregante Jul 8, 2023
16bbcb4
Fix
fregante Jul 8, 2023
1d448b4
Meta
fregante Jul 8, 2023
87a8a39
6.0.0-5
fregante Jul 8, 2023
767721e
ts plz
fregante Jul 24, 2023
517e10a
Cleanup
fregante Jul 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/esm-lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
env:
IMPORT_TEXT: import storageCache from
IMPORT_TEXT: import {CachedValue, CachedFunction, globalCache} from
NPM_MODULE_NAME: webext-storage-cache

# FILE GENERATED WITH: npx ghat fregante/ghatemplates/esm-lint
Expand Down Expand Up @@ -74,13 +74,15 @@ jobs:
- run: npm install ./artifact
- run: npx esbuild --bundle index.js
TypeScript:
if: false
runs-on: ubuntu-latest
needs: Pack
steps:
- uses: actions/download-artifact@v3
- run: npm install ./artifact
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.ts
- run: tsc index.ts
- run: npm install ./artifact @sindresorhus/tsconfig
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.mts
- run: echo '{"extends":"@sindresorhus/tsconfig","files":["index.mts"]}' > tsconfig.json
- run: tsc
- run: cat index.js
Node:
runs-on: ubuntu-latest
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ Thumbs.db
*.bak
*.log
logs
*.map
/index.js
/index.test-d.js
*.d.ts
distribution
67 changes: 0 additions & 67 deletions index.test-d.ts

This file was deleted.

Loading