New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

next-build-cache

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-build-cache - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

lib/cache.d.ts

@@ -12,3 +12,4 @@ interface CacheConfig {

}
export { Cache };
declare function accessCache<T>(filename: string, config?: Partial<CacheConfig>): Cache<T>;
export { accessCache };
//# sourceMappingURL=cache.d.ts.map

@@ -53,3 +53,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Cache = void 0;
exports.accessCache = void 0;
var fs_1 = __importDefault(require("fs"));

@@ -146,3 +146,7 @@ var path_1 = __importDefault(require("path"));

}());
exports.Cache = Cache;
function accessCache(filename, config) {
if (config === void 0) { config = {}; }
return new Cache(filename, config);
}
exports.accessCache = accessCache;
//# sourceMappingURL=cache.js.map

@@ -1,2 +0,2 @@

export { Cache as default } from './cache';
export { accessCache } from './cache';
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = void 0;
exports.accessCache = void 0;
var cache_1 = require("./cache");
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return cache_1.Cache; } });
Object.defineProperty(exports, "accessCache", { enumerable: true, get: function () { return cache_1.accessCache; } });
//# sourceMappingURL=index.js.map
{
"name": "next-build-cache",
"version": "1.0.0",
"version": "1.0.1",
"description": "Ultra simple file system based caching built for the next.js build process.",

@@ -13,5 +13,5 @@ "main": "lib/index.js",

"cache",
"file",
"cache",
"nextjs"
"file-cache",
"nextjs",
"build-cache"
],

@@ -18,0 +18,0 @@ "author": "Erik Schake",

@@ -26,12 +26,12 @@ # next-build-cache

```javascript
import Cache from 'next-build-cache';
import { accessCache } from 'next-build-cache';
// Create a new cache instance using the file 'build.cache'
const BuildCache = new Cache('build.cache');
// Access the cache using the file 'build.cache'
const cache = accessCache('build.cache');
// save a key-value pair with a specified time to live in ms
BuildCache.put('mykey', 'myvalue', 1000);
cache.put('mykey', 'myvalue', 1000);
// get the value of a key
BuildCache.get('mykey');
cache.get('mykey');
```

@@ -38,0 +38,0 @@

import fs from 'fs';
import path from 'path';
import { ModifierFlags } from 'typescript';
import { promisify } from 'util';

@@ -74,2 +73,6 @@

export { Cache };
function accessCache<T>(filename: string, config: Partial<CacheConfig> = {}) {
return new Cache<T>(filename, config);
}
export { accessCache };

@@ -1,1 +0,1 @@

export { Cache as default } from './cache';
export { accessCache } from './cache';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc