Socket
Socket
Sign inDemoInstall

@react-native-community/cli-tools

Package Overview
Dependencies
50
Maintainers
30
Versions
157
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 12.1.1 to 12.2.0

9

build/cacheManager.d.ts
type CacheKey = 'eTag' | 'lastChecked' | 'latestVersion' | 'dependencies';
/**
* Returns the path string of `$HOME/.react-native-cli`.
*
* In case it doesn't exist, it will be created.
*/
declare function getCacheRootPath(): string;
declare function removeProjectCache(name: string): void;
declare function get(name: string, key: CacheKey): string | undefined;

@@ -7,4 +14,6 @@ declare function set(name: string, key: CacheKey, value: string): void;

set: typeof set;
removeProjectCache: typeof removeProjectCache;
getCacheRootPath: typeof getCacheRootPath;
};
export default _default;
//# sourceMappingURL=cacheManager.d.ts.map

24

build/cacheManager.js

@@ -35,2 +35,9 @@ "use strict";

}
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
var _logger = _interopRequireDefault(require("./logger"));

@@ -78,2 +85,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

}
function removeProjectCache(name) {
const cacheRootPath = getCacheRootPath();
try {
const fullPath = _path().default.resolve(cacheRootPath, name);
if (_fs().default.existsSync(fullPath)) {
_fs().default.rmSync(fullPath, {
recursive: true
});
}
} catch {
_logger.default.error(`Failed to remove cache for ${name}. If you experience any issues when running freshly initialized project, please remove the "${_chalk().default.underline(_path().default.join(cacheRootPath, name))}" folder manually.`);
}
}
function get(name, key) {

@@ -95,3 +115,5 @@ const cache = loadCache(name);

get,
set
set,
removeProjectCache,
getCacheRootPath
};

@@ -98,0 +120,0 @@ exports.default = _default;

6

package.json
{
"name": "@react-native-community/cli-tools",
"version": "12.1.1",
"version": "12.2.0",
"license": "MIT",

@@ -22,3 +22,3 @@ "main": "build/index.js",

"devDependencies": {
"@react-native-community/cli-types": "12.1.1",
"@react-native-community/cli-types": "12.2.0",
"@types/lodash": "^4.14.149",

@@ -41,3 +41,3 @@ "@types/mime": "^2.0.1",

},
"gitHead": "a45a2d92c3d53dcb0cf7ba8be4860ad75ff06702"
"gitHead": "f30a010c3036b04f2bd5430a27586472466082a8"
}

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc