Socket
Socket
Sign inDemoInstall

asar

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asar - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

lib/index.d.ts

6

CHANGELOG.md

@@ -1,7 +0,7 @@

## [2.0.3](https://github.com/electron/asar/compare/v2.0.2...v2.0.3) (2019-12-13)
# [2.1.0](https://github.com/electron/asar/compare/v2.0.3...v2.1.0) (2020-02-19)
### Bug Fixes
### Features
* use CFA v2 ([e49bdc7](https://github.com/electron/asar/commit/e49bdc7))
* add TypeScript definition ([#190](https://github.com/electron/asar/issues/190)) ([f9eb91d](https://github.com/electron/asar/commit/f9eb91d))

@@ -8,0 +8,0 @@ # Changes By Version

@@ -179,4 +179,5 @@ 'use strict'

return filenames.map((filename) => {
filename = filename.substr(1) // get rid of leading slash
for (const fullPath of filenames) {
// Remove leading slash
const filename = fullPath.substr(1)
const destFilename = path.join(dest, filename)

@@ -191,9 +192,7 @@ const file = filesystem.getFile(filename, followLinks)

const linkDestPath = path.dirname(destFilename)
const relativePath = path.relative(linkDestPath, linkSrcPath);
const relativePath = path.relative(linkDestPath, linkSrcPath)
// try to delete output file, because we can't overwrite a link
(() => {
try {
fs.unlinkSync(destFilename)
} catch (error) {}
})()
try {
fs.unlinkSync(destFilename)
} catch (error) {}
const linkTo = path.join(relativePath, path.basename(file.link))

@@ -206,3 +205,3 @@ fs.symlinkSync(linkTo, destFilename)

}
})
}
}

@@ -209,0 +208,0 @@

@@ -116,19 +116,17 @@ 'use strict'

const files = []
const fillFilesFromHeader = function (p, json) {
if (!json.files) {
const fillFilesFromMetadata = function (basePath, metadata) {
if (!metadata.files) {
return
}
return (() => {
const result = []
for (const f in json.files) {
const fullPath = path.join(p, f)
const packState = json.files[f].unpacked === true ? 'unpack' : 'pack '
files.push((options && options.isPack) ? `${packState} : ${fullPath}` : fullPath)
result.push(fillFilesFromHeader(fullPath, json.files[f]))
}
return result
})()
for (const [childPath, childMetadata] of Object.entries(metadata.files)) {
const fullPath = path.join(basePath, childPath)
const packState = childMetadata.unpacked ? 'unpack' : 'pack '
files.push((options && options.isPack) ? `${packState} : ${fullPath}` : fullPath)
fillFilesFromMetadata(fullPath, childMetadata)
}
}
fillFilesFromHeader('/', this.header)
fillFilesFromMetadata('/', this.header)
return files

@@ -135,0 +133,0 @@ }

{
"main": "./lib/asar.js",
"name": "asar",
"description": "Creating Electron app packages",
"version": "2.0.3",
"version": "2.1.0",
"main": "./lib/asar.js",
"types": "./lib/index.d.ts",
"bin": {

@@ -22,4 +23,7 @@ "asar": "./bin/asar.js"

"scripts": {
"test": "xvfb-maybe electron-mocha --reporter spec && mocha --reporter spec && npm run lint",
"lint": "standard"
"mocha": "xvfb-maybe electron-mocha --reporter spec && mocha --reporter spec",
"test": "npm run lint && npm run mocha",
"lint": "tsd && standard",
"standard": "standard",
"tsd": "tsd"
},

@@ -31,2 +35,5 @@ "standard": {

},
"tsd": {
"directory": "test"
},
"dependencies": {

@@ -41,2 +48,5 @@ "chromium-pickle-js": "^0.2.0",

},
"optionalDependencies": {
"@types/glob": "^7.1.1"
},
"devDependencies": {

@@ -52,4 +62,5 @@ "@continuous-auth/semantic-release-npm": "^2.0.0",

"standard": "^12.0.1",
"tsd": "^0.11.0",
"xvfb-maybe": "^0.2.1"
}
}

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