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

@nx/devkit

Package Overview
Dependencies
Maintainers
4
Versions
719
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nx/devkit - npm Package Compare versions

Comparing version 16.0.0-beta.7 to 16.0.0-beta.8

src/utils/binary-extensions.d.ts

6

package.json
{
"name": "@nx/devkit",
"version": "16.0.0-beta.7",
"version": "16.0.0-beta.8",
"private": false,

@@ -31,3 +31,3 @@ "description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more.",

"dependencies": {
"@nrwl/devkit": "16.0.0-beta.7",
"@nrwl/devkit": "16.0.0-beta.8",
"ejs": "^3.1.7",

@@ -49,3 +49,3 @@ "ignore": "^5.0.4",

"types": "./index.d.ts",
"gitHead": "eb477479bf73bca940323a66e486221f00006c0f"
"gitHead": "200cf327337f17cea009d83e9055a628346b4084"
}

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

const nx_1 = require("../../nx");
const binary_extensions_1 = require("../utils/binary-extensions");
const { logger } = (0, nx_1.requireNx)();
const binaryExts = new Set([
// // Image types originally from https://github.com/sindresorhus/image-type/blob/5541b6a/index.js
'.jpg',
'.jpeg',
'.png',
'.gif',
'.webp',
'.flif',
'.cr2',
'.tif',
'.bmp',
'.jxr',
'.psd',
'.ico',
'.bpg',
'.jp2',
'.jpm',
'.jpx',
'.heic',
'.cur',
'.tgz',
// Java files
'.jar',
'.keystore',
// Font files
'.ttf',
'.otf',
'.woff',
'.woff2',
'.eot',
]);
/**

@@ -72,3 +42,3 @@ * Generates a folder of files based on provided templates.

const computedPath = computePath(srcFolder, target, filePath, substitutions);
if (binaryExts.has(path.extname(filePath))) {
if ((0, binary_extensions_1.isBinaryPath)(filePath)) {
newContent = (0, fs_1.readFileSync)(filePath);

@@ -75,0 +45,0 @@ }

@@ -10,2 +10,3 @@ "use strict";

function visitNotIgnoredFiles(tree, dirPath = tree.root, visitor) {
// TODO (v17): use packages/nx/src/utils/ignore.ts
let ig;

@@ -17,2 +18,5 @@ if (tree.exists('.gitignore')) {

}
if (tree.exists('.nxignore')) {
ig.add(tree.read('.nxignore', 'utf-8'));
}
dirPath = normalizePathRelativeToRoot(dirPath, tree.root);

@@ -19,0 +23,0 @@ if (dirPath !== '' && (ig === null || ig === void 0 ? void 0 : ig.ignores(dirPath))) {

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

const path_1 = require("path");
const binary_extensions_1 = require("./binary-extensions");
const { getProjects, updateProjectConfiguration, readNxJson, updateNxJson, updateJson, } = (0, nx_1.requireNx)();

@@ -98,2 +99,5 @@ function replaceNrwlPackageWithNxPackage(tree, oldPackageName, newPackageName) {

(0, visit_not_ignored_files_1.visitNotIgnoredFiles)(tree, '.', (path) => {
if ((0, binary_extensions_1.isBinaryPath)(path)) {
return;
}
const ignoredFiles = [

@@ -105,3 +109,3 @@ 'yarn.lock',

];
if (ignoredFiles.includes(path)) {
if (ignoredFiles.includes((0, path_1.basename)(path))) {
return;

@@ -108,0 +112,0 @@ }

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