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

publint

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

publint - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

2

package.json
{
"name": "publint",
"version": "0.1.4",
"version": "0.1.5",
"description": "Lint packaging errors",

@@ -5,0 +5,0 @@ "type": "module",

@@ -186,3 +186,3 @@ import {

// check file existance for other known package fields
// check file existence for other known package fields
const knownFields = ['types', 'jsnext:main', 'jsnext', 'unpkg', 'jsdelivr']

@@ -198,3 +198,3 @@ for (const field of knownFields) {

// check file existance for browser field
// check file existence for browser field
if (browser) {

@@ -288,2 +288,11 @@ crawlBrowser(browser)

/**
* @param {string} exports
*/
async function getExportsFiles(exports) {
const exportsPath = vfs.pathJoin(pkgDir, exports)
const isGlob = exports.includes('*')
return isGlob ? await exportsGlob(exportsPath, vfs) : [exportsPath]
}
function crawlExports(

@@ -314,7 +323,4 @@ exports,

const exportsPath = vfs.pathJoin(pkgDir, exports)
const isGlob = exports.includes('*')
const exportsFiles = isGlob
? await exportsGlob(exportsPath, vfs)
: [exportsPath]
const exportsFiles = await getExportsFiles(exports)

@@ -420,6 +426,11 @@ if (isGlob && !exportsFiles.length) {

if (key === 'types') {
// only check file existance
// only check file existence
promiseQueue.push(async () => {
const typesPath = vfs.pathJoin(pkgDir, exports[key])
await readFile(typesPath, currentPath.concat(key))
const typesFiles = await getExportsFiles(exports[key])
const typesPath = currentPath.concat(key)
const pq = createPromiseQueue()
for (const typesFile of typesFiles) {
pq.push(async () => await readFile(typesFile, typesPath))
}
await pq.wait()
})

@@ -426,0 +437,0 @@ } else {

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