@grammar/xml
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
434
0
18544
6
+ Added@spellu/engine@0.2.3(transitive)
- Removed@spellu/engine@0.1.1(transitive)
Updated@spellu/engine@^0.2.0