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

@grammar/xml

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grammar/xml - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

12

modules/grammar-xml.d.ts

@@ -86,14 +86,14 @@ import spellu from './spellu-engine';

declare namespace grammar$xml.processors {
const stacked: spellu.Processor;
const extracted: spellu.Processor;
const raw: spellu.Processor;
}
declare namespace grammar$xml.processors {
const cst: spellu.Processor;
}
declare namespace grammar$xml {
enum ProcessorKind {
Stacked = "stacked",
Extracted = "extracted",
Raw = "raw"
Raw = "raw",
CST = "cst"
}
function prepare(processor?: ProcessorKind): spellu.Board;
function build<V = StyleSheet>(source: spellu.Source, processor?: ProcessorKind): V | null;
function build<V = Document>(source: spellu.Source, processor?: ProcessorKind): V | null;
function tokens(source: spellu.Source): Token[] | null;

@@ -100,0 +100,0 @@ }

{
"name": "@grammar/xml",
"version": "0.3.2",
"version": "0.3.3",
"description": "XML 1.1 grammar.",

@@ -19,4 +19,7 @@ "keywords": [

],
"engines": {
"node": "~13"
},
"dependencies": {
"@spellu/engine": "^0.1.1"
"@spellu/engine": "^0.2.0"
},

@@ -30,4 +33,3 @@ "scripts": {

"registry": "https://registry.npmjs.org/"
},
"gitHead": "6a75afcfce0050588b0485785b3fee6719dfa0a6"
}
}

@@ -6,2 +6,45 @@ #!/usr/bin/env node

const processedPackages = []
linkDependencyModules('./modules')
function linkDependencyModules(localDir) {
if (!fs.existsSync(localDir)) {
fs.mkdirSync(localDir)
}
const config = loadConfig('./package.json')
linkDependency(localDir, config)
}
function linkDependency(localDir, config) {
console.info(`Visit package "${config.name}".`)
for (const packageName in config.dependencies || {}) {
if (processedPackages.includes(packageName)) continue
try {
const configPath = require.resolve(fspath.join(packageName, 'package.json'))
const config = loadConfig(configPath)
const moduleDir = fspath.dirname(configPath)
if (config.main && config.main.endsWith('.mjs')) {
link(packageName, [config.main, config.types].filter(_ => _), moduleDir, localDir)
}
processedPackages.push(packageName)
// linkDependency(localDir, config)
}
catch (error) {
console.log('...Skipped.')
}
}
}
function loadConfig(path) {

@@ -17,3 +60,3 @@ try {

function link(names, moduleDir, localDir) {
function link(packageName, names, moduleDir, localDir) {
for (const name of names) {

@@ -23,5 +66,10 @@ const modulePath = fspath.join(moduleDir, name)

if (!fs.existsSync(modulePath)) {
console.error(`Package "${packageName}": File "${modulePath}" not found.`)
continue
}
if (!fs.existsSync(localPath)) {
fs.symlinkSync(fspath.relative(localDir, modulePath), localPath)
console.log(`Create symlink "${localPath}".`)
console.info(`Create symlink "${localPath}".`)
}

@@ -31,22 +79,1 @@ }

function linkDependencyModules(localDir) {
if (!fs.existsSync(localDir)) {
fs.mkdirSync(localDir)
}
const config = loadConfig('./package.json')
for (const packageName in config.dependencies || {}) {
const configPath = require.resolve(fspath.join(packageName, 'package.json'))
const config = loadConfig(configPath)
const moduleDir = fspath.dirname(configPath)
if (config.main && config.main.endsWith('.mjs')) {
link([config.main, config.types].filter(_ => _), moduleDir, localDir)
}
}
}
linkDependencyModules('./modules')

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