@khanacademy/simple-markdown
Advanced tools
Comparing version 0.0.0-PR681-20230821185150 to 0.0.0-PR681-20230821192414
# @khanacademy/simple-markdown | ||
## 0.0.0-PR681-20230821185150 | ||
## 0.0.0-PR681-20230821192414 | ||
### Minor Changes | ||
- 0993a46b: Don't generate Flow types | ||
### Patch Changes | ||
- afb14cff: Add eslint rule to make type imports consistent | ||
- ce5e6297: Upgrade wonder-blocks deps to package versions without Flow types | ||
@@ -9,0 +14,0 @@ ## 0.9.3 |
@@ -137,7 +137,7 @@ /* eslint-disable prefer-spread, no-regex-spaces, @typescript-eslint/no-unused-vars, guard-for-in, no-console, no-var */ | ||
if (!(currQuality <= quality)) { | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'string' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'string' is not assignable to type 'null'. | ||
ruleType = currRuleType; | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'ParserRule' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'ParserRule' is not assignable to type 'null'. | ||
rule = currRule; | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'Capture' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'Capture' is not assignable to type 'null'. | ||
capture = currCapture; | ||
@@ -170,3 +170,3 @@ quality = currQuality; | ||
} | ||
// @ts-expect-error [FEI-5003] - TS2339 - Property 'index' does not exist on type 'never'. | ||
// @ts-expect-error - TS2339 - Property 'index' does not exist on type 'never'. | ||
if (capture.index) { | ||
@@ -177,3 +177,3 @@ // If present and non-zero, i.e. a non-^ regexp result: | ||
// @ts-expect-error [FEI-5003] - TS2339 - Property 'parse' does not exist on type 'never'. | ||
// @ts-expect-error - TS2339 - Property 'parse' does not exist on type 'never'. | ||
var parsed = rule.parse(capture, nestedParse, state); | ||
@@ -230,3 +230,3 @@ // We maintain the same object here so that rules can | ||
}; | ||
// @ts-expect-error [FEI-5003] - TS2339 - Property 'regex' does not exist on type '(source: string, state: State, prevCapture: string) => Capture | null | undefined'. | ||
// @ts-expect-error - TS2339 - Property 'regex' does not exist on type '(source: string, state: State, prevCapture: string) => Capture | null | undefined'. | ||
match.regex = regex; | ||
@@ -437,3 +437,3 @@ return match; | ||
} | ||
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'SingleASTNode' is not assignable to parameter of type 'never'. | ||
// @ts-expect-error - TS2345 - Argument of type 'SingleASTNode' is not assignable to parameter of type 'never'. | ||
cells[cells.length - 1].push(node); | ||
@@ -697,3 +697,3 @@ } | ||
var start = ordered ? +bullet : undefined; | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'RegExpMatchArray | null' is not assignable to type 'string[]'. | ||
// @ts-expect-error - TS2322 - Type 'RegExpMatchArray | null' is not assignable to type 'string[]'. | ||
var items = capture[0].replace(LIST_BLOCK_END_R, "\n").match(LIST_ITEM_R); | ||
@@ -1255,3 +1255,3 @@ | ||
var nestedRuleOutput = function nestedRuleOutput(ast, outputFunc, state) { | ||
// @ts-expect-error [FEI-5003] - TS2349 - This expression is not callable. | ||
// @ts-expect-error - TS2349 - This expression is not callable. | ||
// Type 'unknown' has no call signatures. | ||
@@ -1279,3 +1279,3 @@ return rules[ast.type][property](ast, outputFunc, state); | ||
if (typeof nodeOut === "string" && typeof lastResult === "string") { | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'string' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'string' is not assignable to type 'null'. | ||
lastResult = lastResult + nodeOut; | ||
@@ -1285,3 +1285,3 @@ result[result.length - 1] = lastResult; | ||
result.push(nodeOut); | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'ReactNode' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'ReactNode' is not assignable to type 'null'. | ||
lastResult = nodeOut; | ||
@@ -1322,7 +1322,7 @@ } | ||
// Tricks to convince tsc that this var is not null: | ||
// @ts-expect-error [FEI-5003] - TS2538 - Type 'symbol' cannot be used as an index type. | ||
// @ts-expect-error - TS2538 - Type 'symbol' cannot be used as an index type. | ||
var arrayRuleCheck = arrayRule[property]; | ||
if (!arrayRuleCheck) { | ||
throw new Error("simple-markdown: outputFor: to join nodes of type `" + | ||
// @ts-expect-error [FEI-5003] - TS2469 - The '+' operator cannot be applied to type 'symbol'. | ||
// @ts-expect-error - TS2469 - The '+' operator cannot be applied to type 'symbol'. | ||
property + "` you must provide an `Array:` joiner rule with that type, " + "Please see the docs for details on specifying an Array rule."); | ||
@@ -1337,3 +1337,3 @@ } | ||
} else { | ||
// @ts-expect-error [FEI-5003] - TS2349 - This expression is not callable. | ||
// @ts-expect-error - TS2349 - This expression is not callable. | ||
// Type 'unknown' has no call signatures. | ||
@@ -1350,3 +1350,3 @@ return rules[ast.type][property](ast, nestedOutput, state); | ||
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'DefaultRules' is not assignable to parameter of type 'ParserRules'. | ||
// @ts-expect-error - TS2345 - Argument of type 'DefaultRules' is not assignable to parameter of type 'ParserRules'. | ||
var defaultRawParse = parserFor(defaultRules); | ||
@@ -1353,0 +1353,0 @@ var defaultBlockParse = function defaultBlockParse(source, state) { |
@@ -139,7 +139,7 @@ 'use strict'; | ||
if (!(currQuality <= quality)) { | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'string' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'string' is not assignable to type 'null'. | ||
ruleType = currRuleType; | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'ParserRule' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'ParserRule' is not assignable to type 'null'. | ||
rule = currRule; | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'Capture' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'Capture' is not assignable to type 'null'. | ||
capture = currCapture; | ||
@@ -172,3 +172,3 @@ quality = currQuality; | ||
} | ||
// @ts-expect-error [FEI-5003] - TS2339 - Property 'index' does not exist on type 'never'. | ||
// @ts-expect-error - TS2339 - Property 'index' does not exist on type 'never'. | ||
if (capture.index) { | ||
@@ -179,3 +179,3 @@ // If present and non-zero, i.e. a non-^ regexp result: | ||
// @ts-expect-error [FEI-5003] - TS2339 - Property 'parse' does not exist on type 'never'. | ||
// @ts-expect-error - TS2339 - Property 'parse' does not exist on type 'never'. | ||
var parsed = rule.parse(capture, nestedParse, state); | ||
@@ -232,3 +232,3 @@ // We maintain the same object here so that rules can | ||
}; | ||
// @ts-expect-error [FEI-5003] - TS2339 - Property 'regex' does not exist on type '(source: string, state: State, prevCapture: string) => Capture | null | undefined'. | ||
// @ts-expect-error - TS2339 - Property 'regex' does not exist on type '(source: string, state: State, prevCapture: string) => Capture | null | undefined'. | ||
match.regex = regex; | ||
@@ -439,3 +439,3 @@ return match; | ||
} | ||
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'SingleASTNode' is not assignable to parameter of type 'never'. | ||
// @ts-expect-error - TS2345 - Argument of type 'SingleASTNode' is not assignable to parameter of type 'never'. | ||
cells[cells.length - 1].push(node); | ||
@@ -699,3 +699,3 @@ } | ||
var start = ordered ? +bullet : undefined; | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'RegExpMatchArray | null' is not assignable to type 'string[]'. | ||
// @ts-expect-error - TS2322 - Type 'RegExpMatchArray | null' is not assignable to type 'string[]'. | ||
var items = capture[0].replace(LIST_BLOCK_END_R, "\n").match(LIST_ITEM_R); | ||
@@ -1257,3 +1257,3 @@ | ||
var nestedRuleOutput = function (ast, outputFunc, state) { | ||
// @ts-expect-error [FEI-5003] - TS2349 - This expression is not callable. | ||
// @ts-expect-error - TS2349 - This expression is not callable. | ||
// Type 'unknown' has no call signatures. | ||
@@ -1281,3 +1281,3 @@ return rules[ast.type][property](ast, outputFunc, state); | ||
if (typeof nodeOut === "string" && typeof lastResult === "string") { | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'string' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'string' is not assignable to type 'null'. | ||
lastResult = lastResult + nodeOut; | ||
@@ -1287,3 +1287,3 @@ result[result.length - 1] = lastResult; | ||
result.push(nodeOut); | ||
// @ts-expect-error [FEI-5003] - TS2322 - Type 'ReactNode' is not assignable to type 'null'. | ||
// @ts-expect-error - TS2322 - Type 'ReactNode' is not assignable to type 'null'. | ||
lastResult = nodeOut; | ||
@@ -1325,7 +1325,7 @@ } | ||
// Tricks to convince tsc that this var is not null: | ||
// @ts-expect-error [FEI-5003] - TS2538 - Type 'symbol' cannot be used as an index type. | ||
// @ts-expect-error - TS2538 - Type 'symbol' cannot be used as an index type. | ||
var arrayRuleCheck = arrayRule[property]; | ||
if (!arrayRuleCheck) { | ||
throw new Error("simple-markdown: outputFor: to join nodes of type `" + | ||
// @ts-expect-error [FEI-5003] - TS2469 - The '+' operator cannot be applied to type 'symbol'. | ||
// @ts-expect-error - TS2469 - The '+' operator cannot be applied to type 'symbol'. | ||
property + "` you must provide an `Array:` joiner rule with that type, " + "Please see the docs for details on specifying an Array rule."); | ||
@@ -1340,3 +1340,3 @@ } | ||
} else { | ||
// @ts-expect-error [FEI-5003] - TS2349 - This expression is not callable. | ||
// @ts-expect-error - TS2349 - This expression is not callable. | ||
// Type 'unknown' has no call signatures. | ||
@@ -1353,3 +1353,3 @@ return rules[ast.type][property](ast, nestedOutput, state); | ||
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'DefaultRules' is not assignable to parameter of type 'ParserRules'. | ||
// @ts-expect-error - TS2345 - Argument of type 'DefaultRules' is not assignable to parameter of type 'ParserRules'. | ||
var defaultRawParse = parserFor(defaultRules); | ||
@@ -1356,0 +1356,0 @@ var defaultBlockParse = function (source, state) { |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.0.0-PR681-20230821185150", | ||
"version": "0.0.0-PR681-20230821192414", | ||
"publishConfig": { | ||
@@ -29,3 +29,3 @@ "access": "public" | ||
"@types/react-dom": ">=16.0.0", | ||
"perseus-build-settings": "^0.1.0", | ||
"perseus-build-settings": "^0.0.0-PR681-20230821192414", | ||
"size-limit": "^0.21.1", | ||
@@ -32,0 +32,0 @@ "typescript": "^3.6.4", |
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 too big to display
Sorry, the diff of this file is too big to display
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
651400
15