micromark-extension-gfm-table
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -13,3 +13,3 @@ /** | ||
import assert from 'assert' | ||
import assert from 'power-assert' | ||
import {factorySpace} from 'micromark-factory-space' | ||
@@ -42,4 +42,2 @@ import { | ||
let index = -1 | ||
/** @type {Token} */ | ||
let token | ||
/** @type {boolean|undefined} */ | ||
@@ -51,8 +49,2 @@ let inHead | ||
let inRow | ||
/** @type {Token} */ | ||
let cell | ||
/** @type {Token} */ | ||
let content | ||
/** @type {Token} */ | ||
let text | ||
/** @type {number|undefined} */ | ||
@@ -66,3 +58,3 @@ let contentStart | ||
while (++index < events.length) { | ||
token = events[index][1] | ||
const token = events[index][1] | ||
@@ -80,9 +72,13 @@ if (inRow) { | ||
) { | ||
content = { | ||
assert( | ||
contentStart, | ||
'expected `contentStart` to be defined if `contentEnd` is' | ||
) | ||
const content = { | ||
type: 'tableContent', | ||
// @ts-expect-error `contentStart` is defined if `contentEnd` is too. | ||
start: events[contentStart][1].start, | ||
end: events[contentEnd][1].end | ||
} | ||
text = { | ||
/** @type {Token} */ | ||
const text = { | ||
type: types.chunkText, | ||
@@ -95,6 +91,9 @@ start: content.start, | ||
assert( | ||
contentStart, | ||
'expected `contentStart` to be defined if `contentEnd` is' | ||
) | ||
events.splice( | ||
// @ts-expect-error `contentStart` is defined if `contentEnd` is too. | ||
contentStart, | ||
// @ts-expect-error `contentStart` is defined if `contentEnd` is too. | ||
contentEnd - contentStart + 1, | ||
@@ -106,3 +105,3 @@ ['enter', content, context], | ||
) | ||
// @ts-expect-error `contentStart` is defined if `contentEnd` is too. | ||
index -= contentEnd - contentStart - 3 | ||
@@ -123,3 +122,3 @@ contentStart = undefined | ||
) { | ||
cell = { | ||
const cell = { | ||
type: inDelimiterRow | ||
@@ -293,3 +292,2 @@ ? 'tableDelimiter' | ||
function atDelimiterLineStart(code) { | ||
// To do: is the lazy setext thing still needed? | ||
return effects.check( | ||
@@ -296,0 +294,0 @@ setextUnderlineMini, |
@@ -40,5 +40,2 @@ /** | ||
let index = -1 | ||
/** @type {Token} */ | ||
let token | ||
/** @type {boolean|undefined} */ | ||
@@ -53,11 +50,2 @@ | ||
let inRow | ||
/** @type {Token} */ | ||
let cell | ||
/** @type {Token} */ | ||
let content | ||
/** @type {Token} */ | ||
let text | ||
/** @type {number|undefined} */ | ||
@@ -74,3 +62,3 @@ | ||
while (++index < events.length) { | ||
token = events[index][1] | ||
const token = events[index][1] | ||
@@ -88,9 +76,10 @@ if (inRow) { | ||
) { | ||
content = { | ||
const content = { | ||
type: 'tableContent', | ||
// @ts-expect-error `contentStart` is defined if `contentEnd` is too. | ||
start: events[contentStart][1].start, | ||
end: events[contentEnd][1].end | ||
} | ||
text = { | ||
/** @type {Token} */ | ||
const text = { | ||
type: 'chunkText', | ||
@@ -103,4 +92,3 @@ start: content.start, | ||
events.splice( | ||
// @ts-expect-error `contentStart` is defined if `contentEnd` is too. | ||
contentStart, // @ts-expect-error `contentStart` is defined if `contentEnd` is too. | ||
contentStart, | ||
contentEnd - contentStart + 1, | ||
@@ -111,4 +99,3 @@ ['enter', content, context], | ||
['exit', content, context] | ||
) // @ts-expect-error `contentStart` is defined if `contentEnd` is too. | ||
) | ||
index -= contentEnd - contentStart - 3 | ||
@@ -129,3 +116,3 @@ contentStart = undefined | ||
) { | ||
cell = { | ||
const cell = { | ||
type: inDelimiterRow | ||
@@ -292,3 +279,2 @@ ? 'tableDelimiter' | ||
function atDelimiterLineStart(code) { | ||
// To do: is the lazy setext thing still needed? | ||
return effects.check( | ||
@@ -295,0 +281,0 @@ setextUnderlineMini, |
{ | ||
"name": "micromark-extension-gfm-table", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "micromark extension to support GFM tables", | ||
@@ -46,5 +46,7 @@ "license": "MIT", | ||
"micromark-util-symbol": "^1.0.0", | ||
"micromark-util-types": "^1.0.0" | ||
"micromark-util-types": "^1.0.0", | ||
"power-assert": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/power-assert": "^1.0.0", | ||
"@types/tape": "^4.0.0", | ||
@@ -55,4 +57,4 @@ "c8": "^7.0.0", | ||
"prettier": "^2.0.0", | ||
"remark-cli": "^9.0.0", | ||
"remark-preset-wooorm": "^8.0.0", | ||
"remark-cli": "^10.0.0", | ||
"remark-preset-wooorm": "^9.0.0", | ||
"rimraf": "^3.0.0", | ||
@@ -62,3 +64,3 @@ "tape": "^5.0.0", | ||
"typescript": "^4.0.0", | ||
"xo": "^0.39.0" | ||
"xo": "^0.45.0" | ||
}, | ||
@@ -65,0 +67,0 @@ "scripts": { |
@@ -64,3 +64,3 @@ # micromark-extension-gfm-table | ||
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. | ||
@@ -67,0 +67,0 @@ Without this condition, production code is loaded. |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
47512
5
13
1370
+ Addedpower-assert@^1.0.0
+ Addedacorn@5.7.4(transitive)
+ Addedacorn-es7-plugin@1.1.7(transitive)
+ Addedarray-buffer-byte-length@1.0.1(transitive)
+ Addedarray-filter@1.0.0(transitive)
+ Addedarraybuffer.prototype.slice@1.0.3(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcall-signature@0.0.2(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addeddata-view-buffer@1.0.1(transitive)
+ Addeddata-view-byte-length@1.0.1(transitive)
+ Addeddata-view-byte-offset@1.0.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddiff-match-patch@1.0.5(transitive)
+ Addedeastasianwidth@0.2.0(transitive)
+ Addedempower@1.3.1(transitive)
+ Addedempower-core@1.2.0(transitive)
+ Addedes-abstract@1.23.3(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedes-set-tostringtag@2.0.3(transitive)
+ Addedes-to-primitive@1.2.1(transitive)
+ Addedespurify@1.8.1(transitive)
+ Addedestraverse@4.3.0(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedfunction.prototype.name@1.1.6(transitive)
+ Addedfunctions-have-names@1.2.3(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedget-symbol-description@1.0.2(transitive)
+ Addedglobalthis@1.0.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-bigints@1.0.2(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedindexof@0.0.1(transitive)
+ Addedinternal-slot@1.0.7(transitive)
+ Addedis-array-buffer@3.0.4(transitive)
+ Addedis-bigint@1.0.4(transitive)
+ Addedis-boolean-object@1.1.2(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-data-view@1.0.1(transitive)
+ Addedis-date-object@1.0.5(transitive)
+ Addedis-negative-zero@2.0.3(transitive)
+ Addedis-number-object@1.0.7(transitive)
+ Addedis-regex@1.1.4(transitive)
+ Addedis-shared-array-buffer@1.0.3(transitive)
+ Addedis-string@1.0.7(transitive)
+ Addedis-symbol@1.0.4(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedis-weakref@1.0.2(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedobject-inspect@1.13.2(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedpower-assert@1.6.1(transitive)
+ Addedpower-assert-context-formatter@1.2.0(transitive)
+ Addedpower-assert-context-reducer-ast@1.2.0(transitive)
+ Addedpower-assert-context-traversal@1.2.0(transitive)
+ Addedpower-assert-formatter@1.4.1(transitive)
+ Addedpower-assert-renderer-assertion@1.2.0(transitive)
+ Addedpower-assert-renderer-base@1.1.1(transitive)
+ Addedpower-assert-renderer-comparison@1.2.0(transitive)
+ Addedpower-assert-renderer-diagram@1.2.0(transitive)
+ Addedpower-assert-renderer-file@1.2.0(transitive)
+ Addedpower-assert-util-string-width@1.2.0(transitive)
+ Addedregexp.prototype.flags@1.5.3(transitive)
+ Addedsafe-array-concat@1.1.2(transitive)
+ Addedsafe-regex-test@1.0.3(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-function-name@2.0.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstring.prototype.trim@1.2.9(transitive)
+ Addedstring.prototype.trimend@1.0.8(transitive)
+ Addedstring.prototype.trimstart@1.0.8(transitive)
+ Addedstringifier@1.4.1(transitive)
+ Addedtraverse@0.6.10(transitive)
+ Addedtype-name@2.0.2(transitive)
+ Addedtyped-array-buffer@1.0.2(transitive)
+ Addedtyped-array-byte-length@1.0.1(transitive)
+ Addedtyped-array-byte-offset@1.0.2(transitive)
+ Addedtyped-array-length@1.0.6(transitive)
+ Addedtypedarray.prototype.slice@1.0.3(transitive)
+ Addedunbox-primitive@1.0.2(transitive)
+ Addeduniversal-deep-strict-equal@1.2.2(transitive)
+ Addedwhich-boxed-primitive@1.0.2(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)
+ Addedxtend@4.0.2(transitive)