@babel/plugin-transform-typescript
Advanced tools
Comparing version 7.2.0 to 7.3.2
@@ -61,2 +61,3 @@ "use strict"; | ||
api.assertVersion(7); | ||
const JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/; | ||
return { | ||
@@ -72,3 +73,16 @@ name: "transform-typescript", | ||
state.programPath = path; | ||
const { | ||
file | ||
} = state; | ||
if (file.ast.comments) { | ||
for (const comment of file.ast.comments) { | ||
const jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value); | ||
if (jsxMatches) { | ||
jsxPragma = jsxMatches[1]; | ||
} | ||
} | ||
} | ||
for (const stmt of path.get("body")) { | ||
@@ -75,0 +89,0 @@ if (_core().types.isImportDeclaration(stmt)) { |
{ | ||
"name": "@babel/plugin-transform-typescript", | ||
"version": "7.2.0", | ||
"version": "7.3.2", | ||
"description": "Transform TypeScript into ES.next", | ||
@@ -25,3 +25,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-typescript", | ||
"@babel/helper-plugin-test-runner": "^7.0.0" | ||
} | ||
}, | ||
"gitHead": "d896ce2b53f64742feeea27dd33ee45934cd041a" | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16488
471
0