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

@swc-node/core

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swc-node/core - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## [0.4.2](https://github.com/Brooooooklyn/swc-node/compare/@swc-node/core@0.4.1...@swc-node/core@0.4.2) (2020-08-24)
### Bug Fixes
- **core:** linux musl addon loader ([c6e8a78](https://github.com/Brooooooklyn/swc-node/commit/c6e8a7858f504eaabf07254cf7e3ec42eee432eb))
## [0.4.1](https://github.com/Brooooooklyn/swc-node/compare/@swc-node/core@0.4.0...@swc-node/core@0.4.1) (2020-08-23)

@@ -8,0 +14,0 @@

29

index.js

@@ -6,2 +6,3 @@ const { platform } = require('os')

let bindings
let linuxError = null

@@ -11,9 +12,31 @@ try {

} catch (e) {
const platformName = platform()
try {
bindings = require(`@swc-node/core-${platform()}`)
bindings = require(`@swc-node/core-${platformName}`)
} catch (e) {
throw new TypeError('Not compatible with your platform. Error message: ' + e.message)
if (platformName !== 'linux') {
throw new TypeError('Not compatible with your platform. Error message: ' + e.message)
} else {
linuxError = e
}
}
}
if (!bindings) {
try {
require.resolve('@swc-node/core-linux-musl')
} catch (e) {
throw new TypeError(
`Could not load @swc-node/core-linux, You may need add @swc-node/core-linux-musl to optionalDependencies of your project`,
)
}
try {
bindings = require('@swc-node/core-linux-musl')
} catch (e) {
throw new TypeError(
`Linux glibc version load error: ${linuxError.message}; Linux musl version load error: Error message: ${e.message}`,
)
}
}
module.exports = {

@@ -73,3 +96,3 @@ transformSync: function transformSync(source, path, options) {

SWC_VERSION: 'e619144',
SWC_VERSION: '1.2.21',
}

10

package.json
{
"name": "@swc-node/core",
"version": "0.4.1",
"version": "0.4.2",
"description": "Faster swc nodejs binding",

@@ -59,8 +59,8 @@ "keywords": [

},
"gitHead": "dee582f49c2303f36e4efac3f3fdae2d08c10143",
"gitHead": "acb6af39d64f3264038c0f311f4fd3c16163d612",
"optionalDependencies": {
"@swc-node/core-darwin": "^0.4.1",
"@swc-node/core-linux": "^0.4.1",
"@swc-node/core-win32": "^0.4.1"
"@swc-node/core-darwin": "^0.4.2",
"@swc-node/core-linux": "^0.4.2",
"@swc-node/core-win32": "^0.4.2"
}
}
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