MCPcopy Create free account
hub / github.com/adobe/react-spectrum / parse

Function parse

packages/dev/codemods/src/test-utils-rc-update/src/codemod.ts:52–80  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

50export default function transformer(file: FileInfo, api: API): string {
51 let j = api.jscodeshift.withParser({
52 parse(source: string) {
53 return recastParse(source, {
54 parser: {
55 parse(innerSource: string) {
56 return parse(innerSource, {
57 sourceType: 'module',
58 plugins: [
59 'jsx',
60 'typescript',
61 'importAssertions',
62 'dynamicImport',
63 'decorators-legacy',
64 'classProperties',
65 'classPrivateProperties',
66 'classPrivateMethods',
67 'exportDefaultFrom',
68 'exportNamespaceFrom',
69 'objectRestSpread',
70 'optionalChaining',
71 'nullishCoalescingOperator',
72 'topLevelAwait'
73 ],
74 tokens: true,
75 errorRecovery: true
76 });
77 }
78 }
79 });
80 }
81 });
82
83 let root = j(file.source);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected