@teambit/cache 0.0.604 → 0.0.607

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.
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  require("core-js/modules/es.promise.js");
6
4
 
7
5
  function _uuid() {
8
- const data = _interopRequireDefault(require("uuid"));
6
+ const data = require("uuid");
9
7
 
10
8
  _uuid = function () {
11
9
  return data;
@@ -55,7 +53,7 @@ function _cacheMain() {
55
53
  }
56
54
 
57
55
  describe('Cache Aspect', () => {
58
- const cacheDirectory = `/tmp/bit/${(0, _uuid().default)()}`;
56
+ const cacheDirectory = `/tmp/bit/${(0, _uuid().v4)()}`;
59
57
  const cache = new (_cacheMain().CacheMain)({
60
58
  cacheDirectory
61
59
  }, new (_logger().Logger)('cache.main.runtime'));
@@ -1 +1 @@
1
- {"version":3,"names":["describe","cacheDirectory","v4","cache","CacheMain","Logger","it","set","data","get","expect","to","equal","afterAll","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 afterAll(() => {\n rmdirSync(cacheDirectory, {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it","set","data","get","expect","to","equal","afterAll","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 afterAll(() => {\n rmdirSync(cacheDirectory, { recursive: true });\n });\n});\n"],"mappings":";;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEAA,QAAQ,CAAC,cAAD,EAAiB,MAAM;EAC7B,MAAMC,cAAc,GAAI,YAAW,IAAAC,UAAA,GAAK,EAAxC;EACA,MAAMC,KAAK,GAAG,KAAIC,sBAAJ,EAAc;IAAEH;EAAF,CAAd,EAAkC,KAAII,gBAAJ,EAAW,oBAAX,CAAlC,CAAd;EACAC,EAAE,CAAC,8BAAD,EAAiC,YAAY;IAC7C,MAAMH,KAAK,CAACI,GAAN,CAAU,MAAV,EAAkB,KAAlB,EAAyB,IAAzB,CAAN;IACA,MAAMC,IAAI,GAAG,MAAML,KAAK,CAACM,GAAN,CAAU,MAAV,CAAnB;IACA,IAAAC,cAAA,EAAOF,IAAP,EAAaG,EAAb,CAAgBC,KAAhB,CAAsB,KAAtB;EACD,CAJC,CAAF,CAH6B,CAS7B;EACA;EACA;EACA;EACA;EACA;;EAEAN,EAAE,CAAC,wCAAD,EAA2C,YAAY;IACvD,MAAMH,KAAK,CAACI,GAAN,CAAU,MAAV,EAAkB,KAAlB,CAAN;IACA,MAAMC,IAAI,GAAG,MAAML,KAAK,CAACM,GAAN,CAAU,MAAV,CAAnB;IACA,IAAAC,cAAA,EAAOF,IAAP,EAAaG,EAAb,CAAgBC,KAAhB,CAAsB,KAAtB;EACD,CAJC,CAAF;EAMAC,QAAQ,CAAC,MAAM;IACb,IAAAC,eAAA,EAAUb,cAAV,EAA0B;MAAEc,SAAS,EAAE;IAAb,CAA1B;EACD,CAFO,CAAR;AAGD,CAzBO,CAAR"}
package/package.json CHANGED
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "name": "@teambit/cache",
3
- "version": "0.0.604",
3
+ "version": "0.0.607",
4
4
  "homepage": "https://bit.dev/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.604"
9
+ "version": "0.0.607"
10
10
  },
11
11
  "dependencies": {
12
12
  "cacache": "15.0.5",
13
13
  "@babel/runtime": "7.12.18",
14
14
  "core-js": "^3.0.0",
15
15
  "@teambit/harmony": "0.3.3",
16
- "@teambit/cli": "0.0.511",
17
- "@teambit/logger": "0.0.604"
16
+ "@teambit/cli": "0.0.514",
17
+ "@teambit/logger": "0.0.607"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/react": "^17.0.8",
21
21
  "@types/cacache": "12.0.1",
22
22
  "chai": "4.3.0",
23
- "uuid": "3.4.0",
23
+ "uuid": "8.3.2",
24
24
  "@types/chai": "4.2.15",
25
- "@types/uuid": "3.4.9",
25
+ "@types/uuid": "8.3.4",
26
26
  "@types/mocha": "9.1.0",
27
27
  "@types/testing-library__jest-dom": "5.9.5",
28
28
  "@types/jest": "^26.0.0",
@@ -30,7 +30,7 @@
30
30
  "@types/node": "12.20.4"
31
31
  },
32
32
  "peerDependencies": {
33
- "@teambit/legacy": "1.0.292",
33
+ "@teambit/legacy": "1.0.295",
34
34
  "react-dom": "^16.8.0 || ^17.0.0",
35
35
  "react": "^16.8.0 || ^17.0.0"
36
36
  },
@@ -58,7 +58,7 @@
58
58
  "react": "-"
59
59
  },
60
60
  "peerDependencies": {
61
- "@teambit/legacy": "1.0.292",
61
+ "@teambit/legacy": "1.0.295",
62
62
  "react-dom": "^16.8.0 || ^17.0.0",
63
63
  "react": "^16.8.0 || ^17.0.0"
64
64
  }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.604/dist/cache.composition.js'
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.604/dist/cache.docs.mdx'
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.607/dist/cache.composition.js'
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.607/dist/cache.docs.mdx'
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0]