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.6.1 to 0.7.0

6

CHANGELOG.md

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

# [0.7.0](https://github.com/Brooooooklyn/swc-node/compare/@swc-node/core@0.6.1...@swc-node/core@0.7.0) (2020-09-04)
### Features
- **core:** upgrade to napi@0.5 ([bf5f2c4](https://github.com/Brooooooklyn/swc-node/commit/bf5f2c4b9efc074e0b1ff62f8d7ee2b1c578228f))
## [0.6.1](https://github.com/Brooooooklyn/swc-node/compare/@swc-node/core@0.6.0...@swc-node/core@0.6.1) (2020-09-01)

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

39

lib/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SWC_VERSION = exports.transform = exports.transformJest = exports.transformSync = void 0;
const os_1 = require("os");
const path_1 = require("path");
const helper_1 = require("@node-rs/helper");
let bindings;
let linuxError = null;
try {
bindings = helper_1.loadBinding(path_1.join(require.resolve('@swc-node/core'), '..', '..'), 'swc');
}
catch (e) {
const platformName = os_1.platform();
try {
bindings = require(`@swc-node/core-${platformName}`);
}
catch (e) {
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-musl, 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}`);
}
}
const bindings = helper_1.loadBinding(path_1.join(require.resolve('@swc-node/core'), '..', '..'), 'swc', '@swc-node/core');
function transformOption(path, options) {
var _a, _b;
const opts = options == null ? {} : options;
return Buffer.from(JSON.stringify({
return JSON.stringify({
filename: path,

@@ -64,3 +31,3 @@ jsc: {

swcrc: false,
}));
});
}

@@ -67,0 +34,0 @@ function transformSync(source, path, options) {

{
"name": "@swc-node/core",
"version": "0.6.1",
"version": "0.7.0",
"description": "Faster swc nodejs binding",

@@ -37,2 +37,8 @@ "keywords": [

],
"napi": {
"name": "swc",
"musl": [
"linux"
]
},
"engines": {

@@ -53,14 +59,14 @@ "node": ">= 8.9"

"scripts": {
"prepublishOnly": "node -r @swc-node/register ./publish.ts",
"version": "node -r @swc-node/register ./version.ts"
"prepublishOnly": "napi prepublish",
"version": "napi version"
},
"dependencies": {
"@node-rs/helper": "^0.3.1"
"@node-rs/helper": "^0.4.0"
},
"gitHead": "e7161ff24de4ba63f068244e4a4a20df22f135ff",
"gitHead": "4bbe7f4a86ca5b0fe005415162c156cf4c0a8c4d",
"optionalDependencies": {
"@swc-node/core-darwin": "^0.6.1",
"@swc-node/core-linux": "^0.6.1",
"@swc-node/core-win32": "^0.6.1"
"@swc-node/core-darwin": "^0.7.0",
"@swc-node/core-linux": "^0.7.0",
"@swc-node/core-win32": "^0.7.0"
}
}

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