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

@react-native-windows/cli

Package Overview
Dependencies
Maintainers
2
Versions
417
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-windows/cli - npm Package Compare versions

Comparing version 0.0.0-canary.38 to 0.0.0-canary.39

17

CHANGELOG.json

@@ -5,3 +5,18 @@ {

{
"date": "Tue, 17 Nov 2020 05:04:41 GMT",
"date": "Wed, 18 Nov 2020 03:10:32 GMT",
"tag": "@react-native-windows/cli_v0.0.0-canary.39",
"version": "0.0.0-canary.39",
"comments": {
"prerelease": [
{
"comment": "Use MSBuild Builtin Support for NuGet Restore",
"author": "ngerlem@microsoft.com",
"commit": "e1821b205f26bd1f05c466b03f45b61ec7a3bb5e",
"package": "@react-native-windows/cli"
}
]
}
},
{
"date": "Tue, 17 Nov 2020 05:05:00 GMT",
"tag": "@react-native-windows/cli_v0.0.0-canary.38",

@@ -8,0 +23,0 @@ "version": "0.0.0-canary.38",

# Change Log - @react-native-windows/cli
This log was last generated on Tue, 17 Nov 2020 05:04:41 GMT and should not be manually modified.
This log was last generated on Wed, 18 Nov 2020 03:10:32 GMT and should not be manually modified.
<!-- Start content -->
## 0.0.0-canary.39
Wed, 18 Nov 2020 03:10:32 GMT
### Changes
- Use MSBuild Builtin Support for NuGet Restore (ngerlem@microsoft.com)
## 0.0.0-canary.38
Tue, 17 Nov 2020 05:04:41 GMT
Tue, 17 Nov 2020 05:05:00 GMT

@@ -11,0 +19,0 @@ ### Changes

36

lib-commonjs/runWindows/runWindows.js

@@ -45,12 +45,3 @@ "use strict";

}
var RunWindowsPhase;
(function (RunWindowsPhase) {
RunWindowsPhase[RunWindowsPhase["None"] = 0] = "None";
RunWindowsPhase[RunWindowsPhase["AutoLink"] = 1] = "AutoLink";
RunWindowsPhase[RunWindowsPhase["FindBuildTools"] = 2] = "FindBuildTools";
RunWindowsPhase[RunWindowsPhase["NuGetRestore"] = 3] = "NuGetRestore";
RunWindowsPhase[RunWindowsPhase["FindSolution"] = 4] = "FindSolution";
RunWindowsPhase[RunWindowsPhase["Deploy"] = 5] = "Deploy";
})(RunWindowsPhase || (RunWindowsPhase = {}));
let runWindowsPhase = RunWindowsPhase.None;
let runWindowsPhase = 'None';
/**

@@ -137,3 +128,3 @@ * Performs build deploy and launch of RNW apps.

success: runWindowsError === undefined,
phase: RunWindowsPhase[runWindowsPhase],
phase: runWindowsPhase,
totalMem: os_1.totalmem(),

@@ -181,3 +172,3 @@ diskFree: telemetry_1.getDiskFreeSpace(__dirname),

};
runWindowsPhase = RunWindowsPhase.AutoLink;
runWindowsPhase = 'AutoLink';
await autolink_1.autoLinkCommand.func(autolinkArgs, autolinkConfig, autoLinkOptions);

@@ -189,3 +180,3 @@ }

let buildTools;
runWindowsPhase = RunWindowsPhase.FindBuildTools;
runWindowsPhase = 'FindBuildTools';
try {

@@ -206,3 +197,3 @@ buildTools = msbuildtools_1.default.findAvailableVersion(options.arch, verbose);

if (options.build) {
runWindowsPhase = RunWindowsPhase.FindSolution;
runWindowsPhase = 'FindSolution';
if (!slnFile) {

@@ -212,10 +203,2 @@ commandWithProgress_1.newError('Visual Studio Solution file not found. Maybe run "npx react-native-windows-init" first?');

}
try {
runWindowsPhase = RunWindowsPhase.NuGetRestore;
await build.restoreNuGetPackages(slnFile, buildTools, verbose);
}
catch (e) {
commandWithProgress_1.newError('Failed to restore the NuGet packages: ' + e.toString());
throw e;
}
// Get build/deploy options

@@ -227,5 +210,4 @@ const buildType = deploy.getBuildConfiguration(options);

try {
runWindowsPhase = RunWindowsPhase.FindSolution;
await build.buildSolution(buildTools, slnFile, buildType, options.arch, msBuildProps, verbose, undefined, // build the default target
options.buildLogDirectory, options.singleproc);
runWindowsPhase = 'FindSolution';
await build.buildSolution(buildTools, slnFile, buildType, options.arch, msBuildProps, verbose, 'build', options.buildLogDirectory, options.singleproc);
}

@@ -245,3 +227,3 @@ catch (e) {

if (options.deploy) {
runWindowsPhase = RunWindowsPhase.FindSolution;
runWindowsPhase = 'FindSolution';
if (!slnFile) {

@@ -252,3 +234,3 @@ commandWithProgress_1.newError('Visual Studio Solution file not found. Maybe run "npx react-native-windows-init" first?');

try {
runWindowsPhase = RunWindowsPhase.Deploy;
runWindowsPhase = 'Deploy';
if (options.device || options.emulator || options.target) {

@@ -255,0 +237,0 @@ await deploy.deployToDevice(options, verbose);

@@ -9,6 +9,5 @@ /**

import { Config } from '@react-native-community/cli-types';
export declare function buildSolution(buildTools: MSBuildTools, slnFile: string, buildType: BuildConfig, buildArch: BuildArch, msBuildProps: Record<string, string>, verbose: boolean, target?: string, buildLogDirectory?: string, singleproc?: boolean): Promise<void>;
export declare function restoreNuGetPackages(slnFile: string, buildTools: MSBuildTools, verbose: boolean): Promise<void>;
export declare function buildSolution(buildTools: MSBuildTools, slnFile: string, buildType: BuildConfig, buildArch: BuildArch, msBuildProps: Record<string, string>, verbose: boolean, target: 'build' | 'deploy', buildLogDirectory?: string, singleproc?: boolean): Promise<void>;
export declare function getAppSolutionFile(options: RunWindowsOptions, config: Config): string | null;
export declare function getAppProjectFile(options: RunWindowsOptions, config: Config): string | null;
export declare function parseMsBuildProps(options: RunWindowsOptions): Record<string, string>;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.parseMsBuildProps = exports.getAppProjectFile = exports.getAppSolutionFile = exports.restoreNuGetPackages = exports.buildSolution = void 0;
exports.parseMsBuildProps = exports.getAppProjectFile = exports.getAppSolutionFile = exports.buildSolution = void 0;
const path = require("path");

@@ -23,16 +23,2 @@ const msbuildtools_1 = require("./msbuildtools");

exports.buildSolution = buildSolution;
async function restoreNuGetPackages(slnFile, buildTools, verbose) {
const text = 'Restoring NuGet packages ';
const spinner = commandWithProgress_1.newSpinner(text);
await commandWithProgress_1.commandWithProgress(spinner, text, require.resolve('nuget-exe'), [
'restore',
`${slnFile}`,
'-NonInteractive',
'-Verbosity',
verbose ? 'normal' : 'quiet',
'-MSBuildVersion',
buildTools.installationVersion,
], verbose);
}
exports.restoreNuGetPackages = restoreNuGetPackages;
const configErrorString = 'Error: ';

@@ -39,0 +25,0 @@ function getAppSolutionFile(options, config) {

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

await commandWithProgress_1.runPowerShellScriptFunction('Installing dependent framework packages', windowsStoreAppUtils, `Install-AppDependencies ${appxManifestPath} ${appPackageFolder} ${options.arch}`, verbose);
await build.buildSolution(buildTools, slnFile, options.release ? 'Release' : 'Debug', options.arch, { DeployLayout: 'true' }, verbose, 'Deploy', options.buildLogDirectory);
await build.buildSolution(buildTools, slnFile, options.release ? 'Release' : 'Debug', options.arch, { DeployLayout: 'true' }, verbose, 'deploy', options.buildLogDirectory);
}

@@ -198,0 +198,0 @@ const appFamilyName = child_process_1.execSync(`powershell -NoProfile -c $(Get-AppxPackage -Name ${appName}).PackageFamilyName`)

@@ -19,5 +19,5 @@ /**

cleanProject(slnFile: string): void;
buildProject(slnFile: string, buildType: BuildConfig, buildArch: BuildArch, msBuildProps: Record<string, string>, verbose: boolean, target: string | undefined, buildLogDirectory: string | undefined, singleproc?: boolean): Promise<void>;
buildProject(slnFile: string, buildType: BuildConfig, buildArch: BuildArch, msBuildProps: Record<string, string>, verbose: boolean, target: 'build' | 'deploy', buildLogDirectory: string | undefined, singleproc?: boolean): Promise<void>;
static findAvailableVersion(buildArch: BuildArch, verbose: boolean, prerelease?: boolean): MSBuildTools;
static getAllAvailableUAPVersions(): Version[];
}

@@ -70,5 +70,8 @@ "use strict";

}
if (target) {
args.push(`/t:${target}`);
if (target === 'build') {
args.push('/restore', '/p:RestorePackagesConfig=true');
}
else if (target === 'deploy') {
args.push(`/t:Deploy`);
}
if (msBuildProps) {

@@ -89,3 +92,3 @@ Object.keys(msBuildProps).forEach(function (key) {

}
const progressName = target === 'Deploy' ? 'Deploying Solution' : 'Building Solution';
const progressName = target === 'deploy' ? 'Deploying Solution' : 'Building Solution';
const spinner = commandWithProgress_1.newSpinner(progressName);

@@ -117,6 +120,6 @@ try {

];
const version = process.env.VisualStudioVersion || '16.0';
const minVersion = process.env.VisualStudioVersion || '16.5';
const vsInstallation = vsInstalls_1.findLatestVsInstall({
requires,
version,
minVersion,
verbose,

@@ -130,3 +133,3 @@ prerelease,

else {
throw new Error('MSBuild tools not found. Make sure all required components have been installed');
throw new Error(`Could not find MSBuild with VCTools for Visual Studio ${minVersion} or later. Make sure all required components have been installed`);
}

@@ -136,4 +139,4 @@ }

if (fs.existsSync(toolsPath)) {
commandWithProgress_1.newSuccess(`Found MSBuild v${version} at ${toolsPath} (${vsInstallation.installationVersion})`);
return new MSBuildTools(version, toolsPath, vsInstallation.installationVersion);
commandWithProgress_1.newSuccess(`Found compatible MSBuild at ${toolsPath} (${vsInstallation.installationVersion})`);
return new MSBuildTools(minVersion, toolsPath, vsInstallation.installationVersion);
}

@@ -140,0 +143,0 @@ else {

@@ -30,3 +30,3 @@ /**

requires?: string[];
version?: string;
minVersion?: string;
verbose?: boolean;

@@ -33,0 +33,0 @@ prerelease?: boolean;

{
"name": "@react-native-windows/cli",
"version": "0.0.0-canary.38",
"version": "0.0.0-canary.39",
"license": "MIT",

@@ -27,3 +27,2 @@ "main": "lib-commonjs/index.js",

"mustache": "^4.0.1",
"nuget-exe": "5.8.0",
"ora": "^3.4.0",

@@ -30,0 +29,0 @@ "semver": "^7.3.2",

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