Socket
Socket
Sign inDemoInstall

micromark-extension-mdx-jsx

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-extension-mdx-jsx - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

5

dev/lib/factory-tag.d.ts

@@ -34,3 +34,3 @@ /**

* @param {string} tagAttributeValueExpressionMarkerType
* @param {string} tagAttributeValueExpressionMarkerValue
* @param {string} tagAttributeValueExpressionValueType
*/

@@ -69,3 +69,3 @@ export function factoryTag(

tagAttributeValueExpressionMarkerType: string,
tagAttributeValueExpressionMarkerValue: string
tagAttributeValueExpressionValueType: string
): (

@@ -79,4 +79,5 @@ code: import('micromark-util-types').Code

export type Code = import('micromark-util-types').Code
export type Point = import('micromark-util-types').Point
export type Acorn = import('micromark-factory-mdx-expression').Acorn
export type AcornOptions =
import('micromark-factory-mdx-expression').AcornOptions

37

dev/lib/factory-tag.js

@@ -7,2 +7,3 @@ /**

* @typedef {import('micromark-util-types').Code} Code
* @typedef {import('micromark-util-types').Point} Point
* @typedef {import('micromark-factory-mdx-expression').Acorn} Acorn

@@ -15,2 +16,3 @@ * @typedef {import('micromark-factory-mdx-expression').AcornOptions} AcornOptions

import {factoryMdxExpression} from 'micromark-factory-mdx-expression'
import {factorySpace} from 'micromark-factory-space'
import {

@@ -62,3 +64,3 @@ markdownLineEnding,

* @param {string} tagAttributeValueExpressionMarkerType
* @param {string} tagAttributeValueExpressionMarkerValue
* @param {string} tagAttributeValueExpressionValueType
*/

@@ -98,3 +100,3 @@ // eslint-disable-next-line max-params

tagAttributeValueExpressionMarkerType,
tagAttributeValueExpressionMarkerValue
tagAttributeValueExpressionValueType
) {

@@ -106,2 +108,4 @@ const self = this

let marker
/** @type {Point|undefined} */
let startPoint

@@ -113,2 +117,3 @@ return start

assert(code === codes.lessThan, 'expected `<`')
startPoint = self.now()
effects.enter(tagType)

@@ -441,2 +446,3 @@ effects.enter(tagMarkerType)

if (code === codes.leftCurlyBrace) {
assert(startPoint, 'expected `startPoint` to be defined')
return factoryMdxExpression.call(

@@ -454,3 +460,4 @@ self,

false,
allowLazy
allowLazy,
startPoint.column
)(code)

@@ -650,2 +657,3 @@ }

if (code === codes.leftCurlyBrace) {
assert(startPoint, 'expected `startPoint` to be defined')
return factoryMdxExpression.call(

@@ -657,3 +665,3 @@ self,

tagAttributeValueExpressionMarkerType,
tagAttributeValueExpressionMarkerValue,
tagAttributeValueExpressionValueType,
acorn,

@@ -664,3 +672,4 @@ acornOptions,

false,
allowLazy
allowLazy,
startPoint.column
)(code)

@@ -769,6 +778,20 @@ }

effects.exit(types.lineEnding)
return optionalEsWhitespace
return factorySpace(
effects,
optionalEsWhitespace,
types.linePrefix,
constants.tabSize
)
}
return effects.attempt(lazyLineEnd, optionalEsWhitespace, crashEol)(code)
return effects.attempt(
lazyLineEnd,
factorySpace(
effects,
optionalEsWhitespace,
types.linePrefix,
constants.tabSize
),
crashEol
)(code)
}

@@ -775,0 +798,0 @@

@@ -34,3 +34,3 @@ /**

* @param {string} tagAttributeValueExpressionMarkerType
* @param {string} tagAttributeValueExpressionMarkerValue
* @param {string} tagAttributeValueExpressionValueType
*/

@@ -69,3 +69,3 @@ export function factoryTag(

tagAttributeValueExpressionMarkerType: string,
tagAttributeValueExpressionMarkerValue: string
tagAttributeValueExpressionValueType: string
): (

@@ -79,4 +79,5 @@ code: import('micromark-util-types').Code

export type Code = import('micromark-util-types').Code
export type Point = import('micromark-util-types').Point
export type Acorn = import('micromark-factory-mdx-expression').Acorn
export type AcornOptions =
import('micromark-factory-mdx-expression').AcornOptions

@@ -7,2 +7,3 @@ /**

* @typedef {import('micromark-util-types').Code} Code
* @typedef {import('micromark-util-types').Point} Point
* @typedef {import('micromark-factory-mdx-expression').Acorn} Acorn

@@ -13,2 +14,3 @@ * @typedef {import('micromark-factory-mdx-expression').AcornOptions} AcornOptions

import {factoryMdxExpression} from 'micromark-factory-mdx-expression'
import {factorySpace} from 'micromark-factory-space'
import {

@@ -58,3 +60,3 @@ markdownLineEnding,

* @param {string} tagAttributeValueExpressionMarkerType
* @param {string} tagAttributeValueExpressionMarkerValue
* @param {string} tagAttributeValueExpressionValueType
*/

@@ -95,3 +97,3 @@ // eslint-disable-next-line max-params

tagAttributeValueExpressionMarkerType,
tagAttributeValueExpressionMarkerValue
tagAttributeValueExpressionValueType
) {

@@ -105,2 +107,5 @@ const self = this

let marker
/** @type {Point|undefined} */
let startPoint
return start

@@ -110,2 +115,3 @@ /** @type {State} */

function start(code) {
startPoint = self.now()
effects.enter(tagType)

@@ -436,3 +442,4 @@ effects.enter(tagMarkerType)

false,
allowLazy
allowLazy,
startPoint.column
)(code)

@@ -631,3 +638,3 @@ } // Start of an attribute name.

tagAttributeValueExpressionMarkerType,
tagAttributeValueExpressionMarkerValue,
tagAttributeValueExpressionValueType,
acorn,

@@ -638,3 +645,4 @@ acornOptions,

false,
allowLazy
allowLazy,
startPoint.column
)(code)

@@ -739,6 +747,10 @@ }

effects.exit('lineEnding')
return optionalEsWhitespace
return factorySpace(effects, optionalEsWhitespace, 'linePrefix', 4)
}
return effects.attempt(lazyLineEnd, optionalEsWhitespace, crashEol)(code)
return effects.attempt(
lazyLineEnd,
factorySpace(effects, optionalEsWhitespace, 'linePrefix', 4),
crashEol
)(code)
}

@@ -745,0 +757,0 @@

{
"name": "micromark-extension-mdx-jsx",
"version": "1.0.2",
"version": "1.0.3",
"description": "micromark extension to support MDX or MDX.js JSX",

@@ -70,3 +70,3 @@ "license": "MIT",

"typescript": "^4.0.0",
"xo": "^0.45.0"
"xo": "^0.47.0"
},

@@ -92,3 +92,4 @@ "scripts": {

"node/file-extension-in-import": "off",
"unicorn/no-this-assignment": "off"
"unicorn/no-this-assignment": "off",
"unicorn/prefer-code-point": "off"
}

@@ -95,0 +96,0 @@ },

@@ -65,3 +65,3 @@ # micromark-extension-mdx-jsx

The export map supports the endorsed
[`development` condition](https://nodejs.org/api/packages.html#packages\_resolving\_user\_conditions).
[`development` condition](https://nodejs.org/api/packages.html#packages_resolving_user_conditions).
Run `node --conditions development module.js` to get instrumented dev code.

@@ -68,0 +68,0 @@ Without this condition, production code is loaded.

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