Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-native-community/cli-clean

Package Overview
Dependencies
Maintainers
31
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-community/cli-clean - npm Package Compare versions

Comparing version 10.0.0-alpha.0 to 10.0.0

43

build/clean.js

@@ -8,88 +8,61 @@ "use strict";

exports.default = void 0;
function _cliTools() {
const data = require("@react-native-community/cli-tools");
_cliTools = function () {
return data;
};
return data;
}
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _execa() {
const data = _interopRequireDefault(require("execa"));
_execa = function () {
return data;
};
return data;
}
function _fs() {
const data = require("fs");
_fs = function () {
return data;
};
return data;
}
function _os() {
const data = _interopRequireDefault(require("os"));
_os = function () {
return data;
};
return data;
}
function _path() {
const data = _interopRequireDefault(require("path"));
_path = function () {
return data;
};
return data;
}
function _prompts() {
const data = _interopRequireDefault(require("prompts"));
_prompts = function () {
return data;
};
return data;
}
function _util() {
const data = require("util");
_util = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const DEFAULT_GROUPS = ['metro', 'watchman'];
const rmdirAsync = (0, _util().promisify)(_fs().rmdir);
function cleanDir(directory) {

@@ -99,3 +72,2 @@ if (!(0, _fs().existsSync)(directory)) {

}
return rmdirAsync(directory, {

@@ -106,3 +78,2 @@ maxRetries: 3,

}
function findPath(startPath, files) {

@@ -112,3 +83,2 @@ // TODO: Find project files via `@react-native-community/cli`

const filename = _path().default.resolve(startPath, file);
if ((0, _fs().existsSync)(filename)) {

@@ -118,6 +88,4 @@ return filename;

}
return undefined;
}
async function promptForCaches(groups) {

@@ -139,3 +107,2 @@ const {

}
async function clean(_argv, _config, cleanOptions) {

@@ -147,7 +114,5 @@ const {

} = cleanOptions;
if (!(0, _fs().existsSync)(projectRoot)) {
throw new Error(`Invalid path provided! ${projectRoot}`);
}
const COMMANDS = {

@@ -161,6 +126,4 @@ android: {

const gradlew = findPath(projectRoot, candidates);
if (gradlew) {
const script = _path().default.basename(gradlew);
await (0, _execa().default)(_os().default.platform() === 'win32' ? script : `./${script}`, ['clean'], {

@@ -250,12 +213,8 @@ cwd: _path().default.dirname(gradlew)

const groups = include ? include.split(',') : await promptForCaches(COMMANDS);
if (!groups || groups.length === 0) {
return;
}
const spinner = (0, _cliTools().getLoader)();
for (const group of groups) {
const commands = COMMANDS[group];
if (!commands) {

@@ -265,3 +224,2 @@ spinner.warn(`Unknown group: ${group}`);

}
for (const {

@@ -280,3 +238,2 @@ action,

}
var _default = {

@@ -283,0 +240,0 @@ func: clean,

3

build/index.js

@@ -7,7 +7,4 @@ "use strict";

exports.commands = void 0;
var _clean = _interopRequireDefault(require("./clean"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const commands = {

@@ -14,0 +11,0 @@ clean: _clean.default

8

package.json
{
"name": "@react-native-community/cli-clean",
"version": "10.0.0-alpha.0",
"version": "10.0.0",
"license": "MIT",

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

"dependencies": {
"@react-native-community/cli-tools": "^10.0.0-alpha.0",
"@react-native-community/cli-tools": "^10.0.0",
"chalk": "^4.1.2",

@@ -23,3 +23,3 @@ "execa": "^1.0.0",

"devDependencies": {
"@react-native-community/cli-types": "^10.0.0-alpha.0",
"@react-native-community/cli-types": "^10.0.0",
"@types/execa": "^0.9.0",

@@ -34,3 +34,3 @@ "@types/prompts": "^2.0.9"

},
"gitHead": "2d47a1a59054f42b228fdb6fd1dcdecf927443ee"
"gitHead": "f0ff82404a0feff3e7df20a4b3a055062a32bbbe"
}

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