@@ -4,7 +4,6 @@ const { test } = require('uvu');
4
4
const assert = require ( 'uvu/assert' ) ;
5
5
const { SourceMapConsumer } = require ( 'source-map' ) ;
6
6
const { rollup } = require ( 'rollup' ) ;
7
- const sander = require ( 'sander' ) ;
8
7
const { VERSION } = require ( 'svelte/compiler' ) ;
9
8
const plugin = require ( '..' ) ;
10
9
@@ -75,8 +74,8 @@ test('creates a {code, map, dependencies} object, excluding the AST etc', async
75
74
} ) ;
76
75
77
76
test ( 'respects `sourcemapExcludeSources` Rollup option' , async ( ) => {
78
- sander . rimrafSync ( 'test/sourcemap-test/dist' ) ;
79
- sander . mkdirSync ( 'test/sourcemap-test/dist' ) ;
77
+ fs . rmSync ( 'test/sourcemap-test/dist' , { recursive : true , force : true } ) ;
78
+ fs . mkdirSync ( 'test/sourcemap-test/dist' , { recursive : true } ) ;
80
79
81
80
const bundle = await rollup ( {
82
81
input : 'test/sourcemap-test/src/main.js' ,
@@ -263,8 +262,8 @@ test('intercepts warnings', async () => {
263
262
} ) ;
264
263
265
264
test ( 'handles filenames that happen to contain ".svelte"' , async ( ) => {
266
- sander . rimrafSync ( 'test/filename-test/dist' ) ;
267
- sander . mkdirSync ( 'test/filename-test/dist' ) ;
265
+ fs . rmSync ( 'test/filename-test/dist' , { recursive : true , force : true } ) ;
266
+ fs . mkdirSync ( 'test/filename-test/dist' , { recursive : true } ) ;
268
267
269
268
try {
270
269
const bundle = await rollup ( {
@@ -322,8 +321,8 @@ test('handles filenames that happen to contain ".svelte"', async () => {
322
321
test ( 'handles ".svelte.ts/js" files' , async ( ) => {
323
322
if ( ! isSvelte5Plus ) return ;
324
323
325
- sander . rimrafSync ( 'test/filename-test2/dist' ) ;
326
- sander . mkdirSync ( 'test/filename-test2/dist' ) ;
324
+ fs . rmSync ( 'test/filename-test2/dist' , { recursive : true , force : true } ) ;
325
+ fs . mkdirSync ( 'test/filename-test2/dist' , { recursive : true } ) ;
327
326
328
327
try {
329
328
const bundle = await rollup ( {
@@ -351,8 +350,8 @@ test('handles ".svelte.ts/js" files', async () => {
351
350
} ) ;
352
351
353
352
test ( 'ignores ".html" extension by default' , async ( ) => {
354
- sander . rimrafSync ( 'test/node_modules/widget/dist' ) ;
355
- sander . mkdirSync ( 'test/node_modules/widget/dist' ) ;
353
+ fs . rmSync ( 'test/node_modules/widget/dist' , { recursive : true , force : true } ) ;
354
+ fs . mkdirSync ( 'test/node_modules/widget/dist' , { recursive : true } ) ;
356
355
357
356
try {
358
357
const bundle = await rollup ( {
@@ -378,8 +377,8 @@ test('ignores ".html" extension by default', async () => {
378
377
} ) ;
379
378
380
379
test ( 'allows ".html" extension if configured' , async ( ) => {
381
- sander . rimrafSync ( 'test/node_modules/widget/dist' ) ;
382
- sander . mkdirSync ( 'test/node_modules/widget/dist' ) ;
380
+ fs . rmSync ( 'test/node_modules/widget/dist' , { recursive : true , force : true } ) ;
381
+ fs . mkdirSync ( 'test/node_modules/widget/dist' , { recursive : true } ) ;
383
382
384
383
try {
385
384
const bundle = await rollup ( {
0 commit comments