🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

json-as

Package Overview
Dependencies
Maintainers
1
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-as - npm Package Compare versions

Comparing version

to
0.5.23

2

package.json
{
"name": "json-as",
"version": "0.5.22",
"version": "0.5.23",
"description": "JSON encoder/decoder for AssemblyScript",

@@ -5,0 +5,0 @@ "types": "assembly/index.ts",

@@ -51,5 +51,5 @@ import { getName, toString, isStdlib } from "visitor-as/dist/utils.js";

visitClassDeclaration(node) {
var _a;
var _c;
const className = node.name.text;
if (!((_a = node.decorators) === null || _a === void 0 ? void 0 : _a.length))
if (!((_c = node.decorators) === null || _c === void 0 ? void 0 : _c.length))
return;

@@ -131,4 +131,18 @@ let foundDecorator = false;

const transformer = new AsJSONTransform();
// Sort the sources so that user scripts are visited last
const sources = parser.sources.filter(source => !isStdlib(source)).sort((_a, _b) => {
const a = _a.internalPath;
const b = _b.internalPath;
if (a[0] === "~" && b[0] !== "~") {
return -1;
}
else if (a[0] !== "~" && b[0] === "~") {
return 1;
}
else {
return 0;
}
});
// Loop over every source
for (const source of parser.sources) {
for (const source of sources) {
// Ignore all lib and std. Visit everything else.

@@ -135,0 +149,0 @@ if (!isStdlib(source)) {

{
"name": "@json-as/transform",
"version": "0.5.22",
"version": "0.5.23",
"description": "JSON encoder/decoder for AssemblyScript",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",