@teambit/cache 0.0.941 → 0.0.943
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +3 -3
- package/artifacts/preview/teambit_harmony_cache-preview.js +1 -1
- package/dist/cache.spec.js +1 -1
- package/dist/cache.spec.js.map +1 -1
- package/dist/{preview-1704880813005.js → preview-1706757518460.js} +2 -2
- package/package.json +8 -9
- package/tsconfig.json +4 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites>
|
3
|
-
<testsuite name="teambit.harmony/cache@0.0.
|
4
|
-
<testcase classname="cache.spec.js" name="it should set cache with ttl" time="0.
|
5
|
-
<testcase classname="cache.spec.js" name="it should set cache without expire ttl" time="0.
|
3
|
+
<testsuite name="teambit.harmony/cache@0.0.943" tests="2" failures="0" errors="0" skipped="0">
|
4
|
+
<testcase classname="dist/cache.spec.js" name="it should set cache with ttl" time="0.09"/>
|
5
|
+
<testcase classname="dist/cache.spec.js" name="it should set cache without expire ttl" time="0.003"/>
|
6
6
|
</testsuite>
|
7
7
|
</testsuites>
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/cache-preview"]=t():e["teambit.harmony/cache-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/cache-preview"]=t():e["teambit.harmony/cache-preview"]=t()}(self,(()=>(()=>{"use strict";var e={28476:(e,t,o)=>{var r={id:"teambit.harmony/cache@0.0.943",homepage:"https://bit.cloud/teambit/harmony/cache",exported:!0};function n(){const e=i(o(87363));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const c=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/cache.svg"}));c.__bit_component=r,t.Logo=c},87363:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(28476);o(87363);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var c=["components"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},a.apply(this,arguments)}var p={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,c);return(0,n.mdx)(s,a({},p,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
|
package/dist/cache.spec.js
CHANGED
package/dist/cache.spec.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_uuid","data","require","_fs","_chai","_logger","_cacheMain","describe","cacheDirectory","v4","cache","CacheMain","Logger","it","set","get","expect","to","equal","
|
1
|
+
{"version":3,"names":["_uuid","data","require","_fs","_chai","_logger","_cacheMain","describe","cacheDirectory","v4","cache","CacheMain","Logger","it","set","get","expect","to","equal","after","rmdirSync","recursive"],"sources":["cache.spec.ts"],"sourcesContent":["import { v4 } from 'uuid';\nimport { rmdirSync } from 'fs';\nimport { expect } from 'chai';\nimport { Logger } from '@teambit/logger';\nimport { CacheMain } from './cache.main.runtime';\n\ndescribe('Cache Aspect', () => {\n const cacheDirectory = `/tmp/bit/${v4()}`;\n const cache = new CacheMain({ cacheDirectory }, new Logger('cache.main.runtime'));\n it('it should set cache with ttl', async () => {\n await cache.set('_foo', 'bar', 1000);\n const data = await cache.get('_foo');\n expect(data).to.equal('bar');\n });\n\n // this test is flaky, it fails often on CircleCI.\n // it('it should expire cache', async () => {\n // await cache.set('_foo', 'bar', 1);\n // const data = await cache.get('_foo');\n // expect(data).to.equal(null);\n // });\n\n it('it should set cache without expire ttl', async () => {\n await cache.set('_foo', 'bar');\n const data = await cache.get('_foo');\n expect(data).to.equal('bar');\n });\n\n after(() => {\n rmdirSync(cacheDirectory, { recursive: true });\n });\n});\n"],"mappings":";;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,IAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,KAAA,YAA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C;AACJ,CAAC,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.943/dist/cache.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.943/dist/cache.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/cache",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.943",
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/cache",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.harmony",
|
8
8
|
"name": "cache",
|
9
|
-
"version": "0.0.
|
9
|
+
"version": "0.0.943"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"cacache": "15.0.5",
|
13
13
|
"@teambit/harmony": "0.4.6",
|
14
|
-
"@teambit/cli": "0.0.
|
15
|
-
"@teambit/logger": "0.0.
|
14
|
+
"@teambit/cli": "0.0.850",
|
15
|
+
"@teambit/logger": "0.0.943"
|
16
16
|
},
|
17
17
|
"devDependencies": {
|
18
18
|
"@types/cacache": "12.0.1",
|
@@ -21,13 +21,11 @@
|
|
21
21
|
"chai": "4.3.0",
|
22
22
|
"uuid": "8.3.2",
|
23
23
|
"@types/mocha": "9.1.0",
|
24
|
-
"@
|
25
|
-
"@types/testing-library__jest-dom": "^5.9.5",
|
26
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.19"
|
24
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.24"
|
27
25
|
},
|
28
26
|
"peerDependencies": {
|
29
27
|
"react": "^17.0.0 || ^18.0.0",
|
30
|
-
"@types/react": "17.0.
|
28
|
+
"@types/react": "^17.0.73",
|
31
29
|
"@teambit/legacy": "1.0.624"
|
32
30
|
},
|
33
31
|
"license": "Apache-2.0",
|
@@ -42,7 +40,8 @@
|
|
42
40
|
"default": "./dist/index.js"
|
43
41
|
},
|
44
42
|
"./dist/*": "./dist/*",
|
45
|
-
"./artifacts/*": "./artifacts/*"
|
43
|
+
"./artifacts/*": "./artifacts/*",
|
44
|
+
"./*": "./*.ts"
|
46
45
|
},
|
47
46
|
"private": false,
|
48
47
|
"engines": {
|
package/tsconfig.json
CHANGED
@@ -17,7 +17,10 @@
|
|
17
17
|
"resolveJsonModule": true,
|
18
18
|
"allowJs": true,
|
19
19
|
"outDir": "dist",
|
20
|
-
"emitDeclarationOnly": true
|
20
|
+
"emitDeclarationOnly": true,
|
21
|
+
"strict": true,
|
22
|
+
"strictPropertyInitialization": false,
|
23
|
+
"noImplicitAny": false
|
21
24
|
},
|
22
25
|
"exclude": [
|
23
26
|
"artifacts",
|