@@ -5,16 +5,16 @@ import url from "node:url";
55import createEsmUtils from "esm-utils" ;
66
77import getPrettier from "./get-prettier.js" ;
8+ import getPlugins from "./get-plugins.js" ;
89import compileContract from "./utils/compile-contract.js" ;
910import consistentEndOfLine from "./utils/consistent-end-of-line.js" ;
1011import createSnapshot from "./utils/create-snapshot.js" ;
1112import stringifyOptionsForTitle from "./utils/stringify-options-for-title.js" ;
1213import visualizeEndOfLine from "./utils/visualize-end-of-line.js" ;
13- import standalone from "../../dist/standalone.js" ;
1414
1515const { __dirname } = createEsmUtils ( import . meta) ;
1616
17- const { FULL_TEST , TEST_STANDALONE } = process . env ;
17+ const { FULL_TEST } = process . env ;
1818const BOM = "\uFEFF" ;
1919
2020const CURSOR_PLACEHOLDER = "<|>" ;
@@ -190,9 +190,6 @@ function runFormatTest(fixtures, parsers, options) {
190190
191191 describe ( title , ( ) => {
192192 const formatOptions = {
193- plugins : TEST_STANDALONE
194- ? [ standalone ]
195- : [ path . join ( __dirname , "../../src/index.ts" ) ] ,
196193 printWidth : 80 ,
197194 ...options ,
198195 filepath : filename ,
@@ -381,9 +378,12 @@ function shouldSkipEolTest(code, options) {
381378
382379async function parse ( source , options ) {
383380 const prettier = await getPrettier ( ) ;
384- const { ast } = await prettier . __debug . parse ( source , options , {
385- massage : true ,
386- } ) ;
381+
382+ const { ast } = await prettier . __debug . parse (
383+ source ,
384+ { ...options , plugins : await getPlugins ( ) } ,
385+ { massage : true } ,
386+ ) ;
387387 return ast ;
388388}
389389
@@ -437,7 +437,7 @@ async function format(originalText, originalOptions) {
437437
438438 const { formatted : output , cursorOffset } = await prettier . formatWithCursor (
439439 input ,
440- options ,
440+ { ... options , plugins : await getPlugins ( ) } ,
441441 ) ;
442442 const outputWithCursor = insertCursor ( output , cursorOffset ) ;
443443 const eolVisualizedOutput = visualizeEndOfLine ( outputWithCursor ) ;
0 commit comments