New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wxml/traverse

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wxml/traverse - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

tests/index.js

28

lib/logger.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const colors = __importStar(require("colors"));
const colors_1 = __importDefault(require("colors"));
exports.default = {
error(msg) {
colors.red(`【Error】${msg}`);
console.log(colors_1.default.red(`【Error】${msg}`));
},
warn(msg) {
colors.yellow(`【Warn】${msg}`);
console.log(colors_1.default.yellow(`【Warn】${msg}`));
},
trace(msg) {
colors.green(`【Trace】${msg}`);
console.log(colors_1.default.green(`【Trace】${msg}`));
},
};

@@ -754,3 +754,8 @@ "use strict";

}
function traverseNode(node, opts, scope, state, parentPath, skipKeys) {
let DEBUG_SETTING_FLAG = false;
function traverseNode(node, opts, scope, state, parentPath, skipKeys, debugEnable = false) {
if (!DEBUG_SETTING_FLAG) {
debug.enabled = debugEnable;
debugEnable = true;
}
const keys = VISITOR_KEYS[node.type];

@@ -757,0 +762,0 @@ if (!keys)

{
"name": "@wxml/traverse",
"version": "0.0.2",
"version": "0.0.3",
"description": "",
"main": "lib/traverse.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "tsc & node ./tests/index.js",
"build": "rimraf ./lib & tsc",
"prepublish": "rimraf ./lib & tsc"
},

@@ -24,5 +26,3 @@ "repository": {

"peerDependencies": {
"@babel/generator": "^7.20.14",
"@babel/parser": "^7.20.15",
"@babel/traverse": "^7.20.13"
"@wxml/parser": "^0.4.0"
},

@@ -32,4 +32,7 @@ "devDependencies": {

"@babel/parser": "^7.20.15",
"@babel/traverse": "^7.20.13"
"@babel/traverse": "^7.20.13",
"@wxml/generator": "^0.1.0",
"@wxml/parser": "^0.4.0",
"rimraf": "^4.1.2"
}
}

@@ -1,13 +0,13 @@

import * as colors from 'colors';
import colors from 'colors';
export default {
error(msg: string) {
colors.red(`【Error】${msg}`);
console.log(colors.red(`【Error】${msg}`));
},
warn(msg: string) {
colors.yellow(`【Warn】${msg}`);
console.log(colors.yellow(`【Warn】${msg}`));
},
trace(msg: string) {
colors.green(`【Trace】${msg}`);
console.log(colors.green(`【Trace】${msg}`));
},
}
// https://github.com/wxmlfile/wxml-parser/blob/main/docs/ast.md#real-type
// const visitors = require('./visitors');
// const { explode } = require('../../gulp/wxmlUtils/visitors');
// const ElementType = visitors.ElementType;
import { ElementType, explode } from "./visitors";

@@ -858,2 +855,4 @@ import logger from "./logger";

}
let DEBUG_SETTING_FLAG = false;
function traverseNode(

@@ -865,4 +864,9 @@ node: ASTNode,

parentPath: NodePath,
skipKeys?: string[]
skipKeys?: string[],
debugEnable = false,
) {
if (!DEBUG_SETTING_FLAG) {
debug.enabled = debugEnable;
debugEnable = true;
}
const keys = VISITOR_KEYS[node.type];

@@ -869,0 +873,0 @@ if (!keys) return false;

@@ -6,3 +6,3 @@ {

"sourceMap": false,
"lib": ["ESNext"],
"lib": ["ESNext", "DOM"],
"target": "es6",

@@ -9,0 +9,0 @@ "moduleResolution": "node",

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