Socket
Socket
Sign inDemoInstall

@netlify/build-info

Package Overview
Dependencies
Maintainers
0
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/build-info - npm Package Compare versions

Comparing version 7.14.4 to 7.15.0-rc.0

lib/mutex.d.ts

1

lib/frameworks/svelte.d.ts

@@ -7,2 +7,3 @@ import { BaseFramework, Category, Framework } from './framework.js';

excludedNpmDependencies: string[];
configFiles: string[];
category: Category;

@@ -9,0 +10,0 @@ staticAssetsDirectory: string;

@@ -7,2 +7,3 @@ import { BaseFramework, Category } from './framework.js';

excludedNpmDependencies = ['sapper', '@sveltejs/kit'];
configFiles = ['svelte.config.js'];
category = Category.FrontendFramework;

@@ -9,0 +10,0 @@ staticAssetsDirectory = 'static';

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

import { isEqual } from 'lodash-es';
import { coerce, parse } from 'semver';

@@ -8,2 +9,3 @@ import { buildSystems } from './build-systems/index.js';

import { report } from './metrics.js';
import { Mutex } from './mutex.js';
import { AVAILABLE_PACKAGE_MANAGERS, detectPackageManager, } from './package-managers/detect-package-manager.js';

@@ -243,3 +245,11 @@ import { runtimes } from './runtime/index.js';

this.frameworks = new Map();
// A monorepo can have something on the repository root as well.
const rootFrameworks = await this.detectFrameworksInPath();
// Nx build system installs all dependencies on the root which would lead to double detection for root projects
const isNx = this.buildSystems.some(({ id }) => id === 'nx');
const rootFrameworkMutex = new Mutex();
if (this.workspace) {
if (rootFrameworks.length > 0 && !isNx) {
this.frameworks.set('', rootFrameworks);
}
// if we have a workspace parallelize in all workspaces

@@ -257,4 +267,14 @@ await Promise.all(this.workspace.packages.map(async ({ path: pkg, forcedFramework }) => {

else if (this.workspace) {
const result = await this.detectFrameworksInPath(this.fs.join(this.workspace.rootDir, pkg));
this.frameworks.set(pkg, result);
const results = await this.detectFrameworksInPath(this.fs.join(this.workspace.rootDir, pkg));
// if we detect a framework (with the same detection result in a path, instead of the root we need to remove it in the root)
for (const result of results) {
for (let i = 0, max = rootFrameworks.length; i < max; i++) {
if (isEqual(result.detected, rootFrameworks[i].detected)) {
rootFrameworkMutex.runExclusive(async () => {
this.frameworks.set(pkg, rootFrameworks.splice(i, 1));
});
}
}
}
this.frameworks.set(pkg, results);
}

@@ -264,3 +284,3 @@ }));

else {
this.frameworks.set('', await this.detectFrameworksInPath());
this.frameworks.set('', rootFrameworks);
}

@@ -267,0 +287,0 @@ await this.events.emit('detectFrameworks', this.frameworks);

@@ -87,4 +87,13 @@ async function applyBuildSystemOverrides(settings, project, baseDirectory) {

const settings = await Promise.all(settingsPromises);
return settings.filter(Boolean);
return settings.filter((setting) => {
// filter out settings that are not matching the packagePath
// for example we have a monorepo (where on the repository root is a site)
// - in this case the package path would be an empty '' string.
// - so we need to filter out the settings that are not matching the packagePath
if (!setting || (packagePath !== undefined && setting.packagePath !== packagePath)) {
return false;
}
return true;
});
}
//# sourceMappingURL=get-build-settings.js.map

7

package.json
{
"name": "@netlify/build-info",
"version": "7.14.4",
"version": "7.15.0-rc.0",
"description": "Build info utility",

@@ -48,4 +48,4 @@ "type": "module",

"dependencies": {
"@iarna/toml": "^2.2.5",
"@bugsnag/js": "^7.20.0",
"@iarna/toml": "^2.2.5",
"dot-prop": "^7.2.0",

@@ -76,4 +76,3 @@ "find-up": "^6.3.0",

"node": "^14.16.0 || >=16.0.0"
},
"gitHead": "c0bc0b24337b1240bf1a7d4aaadde7d98cdcba70"
}
}

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