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

@unified-latex/unified-latex-util-environments

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unified-latex/unified-latex-util-environments - npm Package Compare versions

Comparing version 1.6.1 to 1.7.0

38

index.d.ts

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

export * from "./libs/process-environment";
export * from "./libs/unified-latex-process-environment";
import * as Ast from '@unified-latex/unified-latex-types';
import { EnvInfo } from '@unified-latex/unified-latex-types';
import { EnvInfoRecord } from '@unified-latex/unified-latex-types';
import { Plugin as Plugin_2 } from 'unified';
declare type PluginOptions = {
environments: EnvInfoRecord;
} | undefined;
/**
* ## What is this?
* Performs any needed processing on the environment (as specified by `envInfo`)
* including attaching arguments and possibly manipulating the environment's body.
*/
export declare function processEnvironment(envNode: Ast.Environment, envInfo: EnvInfo): void;
/**
* Recursively search for and process the specified environments. Arguments are
* consumed according to the `signature` specified. The body is processed
* with the specified `processContent` function (if given). Any specified `renderInfo`
* is attached to the environment node.
*/
export declare function processEnvironments(tree: Ast.Ast, environments: EnvInfoRecord): void;
/**
* Unified plugin to process environment content and attach arguments.
*
* Functions to report on/manipulate environments in a `unified-latex` Abstract Syntax Tree (AST).
*
* ## When should I use this?
*
* If you are working on the internals of `unified-latex-util-parse` or need to make a custom parser
* that treats environments differently.
* @param environments An object whose keys are environment names and values contains information about the environment and its argument signature.
*/
//# sourceMappingURL=index.d.ts.map
export declare const unifiedLatexProcessEnvironments: Plugin_2<PluginOptions[], Ast.Root, Ast.Root>;
export { }

@@ -1,2 +0,1 @@

// libs/process-environment.ts
import { updateRenderInfo } from "@unified-latex/unified-latex-util-render-info";

@@ -36,10 +35,5 @@ import { gobbleArguments } from "@unified-latex/unified-latex-util-arguments";

}
// libs/unified-latex-process-environment.ts
import { visit as visit2 } from "@unified-latex/unified-latex-util-visit";
import { match as match2 } from "@unified-latex/unified-latex-util-match";
import { printRaw as printRaw2 } from "@unified-latex/unified-latex-util-print-raw";
var unifiedLatexProcessEnvironments = function unifiedLatexAttachMacroArguments(options) {
const unifiedLatexProcessEnvironments = function unifiedLatexAttachMacroArguments(options) {
const { environments = {} } = options || {};
const isRelevantEnvironment = match2.createEnvironmentMatcher(environments);
const isRelevantEnvironment = match.createEnvironmentMatcher(environments);
return (tree) => {

@@ -51,7 +45,7 @@ if (Object.keys(environments).length === 0) {

}
visit2(
visit(
tree,
{
leave: (node) => {
const envName = printRaw2(node.env);
const envName = printRaw(node.env);
const envInfo = environments[envName];

@@ -58,0 +52,0 @@ if (!envInfo) {

{
"name": "@unified-latex/unified-latex-util-environments",
"version": "1.6.1",
"version": "1.7.0",
"description": "Tools for manipulating unified-latex ASTs",

@@ -8,8 +8,8 @@ "main": "index.js",

"dependencies": {
"@unified-latex/unified-latex-types": "^1.6.1",
"@unified-latex/unified-latex-util-arguments": "^1.6.1",
"@unified-latex/unified-latex-util-match": "^1.6.1",
"@unified-latex/unified-latex-util-print-raw": "^1.6.1",
"@unified-latex/unified-latex-util-render-info": "^1.6.1",
"@unified-latex/unified-latex-util-visit": "^1.6.1",
"@unified-latex/unified-latex-types": "^1.7.0",
"@unified-latex/unified-latex-util-arguments": "^1.7.0",
"@unified-latex/unified-latex-util-match": "^1.7.0",
"@unified-latex/unified-latex-util-print-raw": "^1.7.0",
"@unified-latex/unified-latex-util-render-info": "^1.7.0",
"@unified-latex/unified-latex-util-visit": "^1.7.0",
"unified": "^10.1.2"

@@ -16,0 +16,0 @@ },

Sorry, the diff of this file is not supported yet

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