Skip to content

Commit c56188d

Browse files
author
Luca Forstner
committed
Rebase changes to makeAST onto #5546
1 parent 3ac430e commit c56188d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/nextjs/src/config/loaders/dataFetchersLoader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default function wrapDataFetchersLoader(this: LoaderThis<LoaderOptions>,
123123
// we know we're in a proxied file and do not need to proxy again.
124124

125125
if (!this.resourceQuery.includes('sentry-proxy-loader')) {
126-
const ast = makeAST(userCode, true); // is there a reason to ever parse without typescript?
126+
const ast = makeAST(userCode); // is there a reason to ever parse without typescript?
127127

128128
const exportedIdentifiers = getExportIdentifierNames(ast);
129129

packages/nextjs/test/config/ast.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test.each([
3535
['export { default } from "module-name";', true],
3636
['export { default, name1 } from "module-name";', true],
3737
])('hasDefaultExport(%s) should return %p', (program, expectedResult) => {
38-
const ast = makeAST(program, true);
38+
const ast = makeAST(program);
3939
expect(hasDefaultExport(ast)).toBe(expectedResult);
4040
});
4141

@@ -95,6 +95,6 @@ test.each([
9595
['export { default } from "module-name";', []],
9696
['export { default, name1 } from "module-name";', ['name1']],
9797
])('getExportIdentifiers(%s) should return %p', (program, expectedIdentifiers) => {
98-
const ast = makeAST(program, true);
98+
const ast = makeAST(program);
9999
expect(getExportIdentifierNames(ast)).toStrictEqual(expectedIdentifiers);
100100
});

0 commit comments

Comments
 (0)