New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bscotch/project

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bscotch/project - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

7

dist/lib/project.d.ts

@@ -138,9 +138,2 @@ import { PackageJson, TsConfig, type DependencyVersion, type PackageJsonDependencyType, type PackageJsonFindOptions, type PackageName, type PackageNameConstructable } from '@bscotch/config';

allowUnusedLabels?: boolean | undefined;
/**
* Remove built files that don't have a corresponding
* source file. Useful to ensure that tests
* are only running against content from the source,
* and that old files won't be accidentally
* deployed.
*/
noImplicitReturns?: boolean | undefined;

@@ -147,0 +140,0 @@ noUncheckedIndexedAccess?: boolean | undefined;

21

dist/lib/project.deps.js

@@ -111,2 +111,3 @@ import { PackageName } from '@bscotch/config';

const srcDir = await tsconfig.srcDir();
const depAdds = [];
morpher.getSourceFiles().forEach((f) => {

@@ -116,12 +117,12 @@ const importer = normalizeInternalDependencyPath(new Pathy(f.getFilePath(), {

}), srcDir, outDir, project);
f.getExportDeclarations().forEach((d) => {
addDependencyToSummary(d, importer, deps);
});
f.getImportDeclarations().forEach((i) => {
addDependencyToSummary(i, importer, deps);
});
depAdds.push(...f
.getExportDeclarations()
.map((d) => addDependencyToSummary(d, importer, deps, tsconfig)), ...f
.getImportDeclarations()
.map((i) => addDependencyToSummary(i, importer, deps, tsconfig)));
});
await Promise.all(depAdds);
return deps;
}
function addDependencyToSummary(declaration, importer, deps) {
async function addDependencyToSummary(declaration, importer, deps, tsconfig) {
if (!declaration) {

@@ -134,3 +135,3 @@ return deps;

}
const depType = depName.match(/^([./]|[$@~#]\/)/)
let depType = depName.match(/^([./]|[$@~#]\/)/)
? 'internal'

@@ -140,2 +141,6 @@ : isNodeNativeModule(depName)

: 'external';
if (depType === 'external' && (await tsconfig.includes(depName))) {
// Then is an alias from the tsconfig.
depType = 'internal';
}
if (depType === 'internal') {

@@ -142,0 +147,0 @@ // Normalize the path to be relative to the project root

{
"name": "@bscotch/project",
"version": "0.3.0",
"version": "0.4.0",
"type": "module",

@@ -19,5 +19,5 @@ "exports": {

"dependencies": {
"@bscotch/config": "^0.3.2",
"@bscotch/pathy": "^0.3.1",
"@bscotch/utility": "^5.0.0",
"@bscotch/config": "^0.3.3",
"@bscotch/pathy": "^0.4.0",
"@bscotch/utility": "^5.1.0",
"@bscotch/validation": "^0.2.0",

@@ -24,0 +24,0 @@ "chalk": "^5.0.1",

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