wallabyjs / public

Repository for Wallaby.js questions and issues
http://wallabyjs.com
758 stars 45 forks source link

Vitest: Failed to parse source for import analysis #3030

Closed tslocke closed 2 years ago

tslocke commented 2 years ago

Issue description or question

I'm trying out vitest. Tests are passing from the command line, but as soon as I start Wallaby, I get

Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension. 

There's no indication of which file has the problem.

Wallaby diagnostics report

{
  editorVersion: '1.67.2',
  pluginVersion: '1.0.338',
  editorType: 'VSCode',
  osVersion: 'darwin 21.4.0',
  nodeVersion: 'v16.15.1',
  coreVersion: '1.0.1299',
  checksum: 'MDY1YTZlY2QyZTAzNjNiNDliMmViMDE1ODI2MDE1NjMsMTY4MjcyNjQwMDAwMCww',
  config: {
    resolveGetters: true,
    diagnostics: {
      vitest: {
        file: {
          config: "import { defineConfig, loadEnv } from 'vite'\n" +
            "import solid from 'vite-plugin-solid'\n" +
            "import tsconfigPaths from 'vite-tsconfig-paths'\n" +
            '\n' +
            'export default defineConfig(({mode}) => ({\n' +
            '  plugins: [\n' +
            '    tsconfigPaths({loose: true}),\n' +
            '    solid()\n' +
            '  ],\n' +
            '\n' +
            '  build: {\n' +
            "    target: 'esnext',\n" +
            '    polyfillDynamicImport: false,\n' +
            '    minify: false,\n' +
            '    chunkSizeWarningLimit: 600,\n' +
            '    rollupOptions: {\n' +
            "      input: './src/main.tsx',\n" +
            '      output: {\n' +
            '        assetFileNames: "[name][extname]",\n' +
            '        chunkFileNames: "[name].js",\n' +
            '        entryFileNames: "[name].js",\n' +
            '        manualChunks: () => "main.js"\n' +
            '      }\n' +
            '    }\n' +
            '  },\n' +
            '\n' +
            '  define: {\n' +
            '    ...envWithProcessPrefix(mode),\n' +
            `    ...(mode == 'production' ? {} : {'__REACT_DEVTOOLS_GLOBAL_HOOK__': '{ "isDisabled": true }'})\n` +
            '  },\n' +
            '\n' +
            '  test: {\n' +
            "    environment: 'jsdom',\n" +
            '    transformMode: {\n' +
            '      web: [/\\.[jt]sx?$/],\n' +
            '    },\n' +
            '    // solid needs to be inline to work around\n' +
            '    // a resolution issue in vitest:\n' +
            '    deps: {\n' +
            '      inline: [/solid-js/, /solid-app-router/],\n' +
            '    },\n' +
            '    // if you have few tests, try commenting one\n' +
            '    // or both out to improve performance:\n' +
            '    threads: false,\n' +
            '    isolate: false,\n' +
            '    globals: true\n' +
            '  },\n' +
            '\n' +
            '  resolve: {\n' +
            "    conditions: ['development', 'browser'],\n" +
            '  },\n' +
            '\n' +
            '}))\n' +
            '\n' +
            'function envWithProcessPrefix(mode) {\n' +
            '  const env = loadEnv(mode, process.cwd())\n' +
            '\n' +
            '  return Object.entries(env).reduce(\n' +
            '    (prev, [key, val]) => {\n' +
            '      return {\n' +
            '        ...prev,\n' +
            '        [\'process.env.\' + key]: `"${val}"`,\n' +
            '      }\n' +
            '    },\n' +
            '    {},\n' +
            '  )\n' +
            '}\n'
        },
        config: {
          allowOnly: true,
          watch: true,
          globals: true,
          environment: 'jsdom',
          threads: false,
          clearMocks: false,
          restoreMocks: false,
          mockReset: false,
          include: [ '**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}' ],
          exclude: [ '**/node_modules/**', '**/dist/**', '**/cypress/**', '**/.{idea,git,cache,output,temp}/**' ],
          testTimeout: 5000,
          hookTimeout: 10000,
          isolate: false,
          watchExclude: [ '**/node_modules/**', '**/dist/**' ],
          forceRerunTriggers: [ '**/package.json/**', '**/vitest.config.*/**', '**/vite.config.*/**' ],
          update: false,
          reporters: [ 'default' ],
          silent: false,
          ui: false,
          uiBase: '/__vitest__/',
          open: true,
          css: { include: [ {} ] },
          coverage: {
            enabled: false,
            clean: true,
            cleanOnRerun: false,
            reportsDirectory: '<homeDir>/Projects/Inio/inio/web/coverage',
            excludeNodeModules: true,
            exclude: [
              'coverage/**',
              'packages/*/test{,s}/**',
              '**/*.d.ts',
              'cypress/**',
              'test{,s}/**',
              'test{,-*}.{js,cjs,mjs,ts,tsx,jsx}',
              '**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}',
              '**/__tests__/**',
              '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc}.config.{js,cjs,mjs,ts}',
              '**/.{eslint,mocha,prettier}rc.{js,cjs,yml}'
            ],
            reporter: [ 'text', 'html' ],
            allowExternal: false,
            extension: [
              '.js',  '.cjs',
              '.mjs', '.ts',
              '.tsx', '.jsx',
              '.vue', '.svelte'
            ],
            tempDirectory: '<homeDir>/Projects/Inio/inio/web/coverage/tmp'
          },
          fakeTimers: { loopLimit: 10000, shouldClearNativeTimers: true, toFake: [ 'setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'setImmediate', 'clearImmediate', 'Date' ] },
          maxConcurrency: 5,
          transformMode: { web: [ {} ] },
          deps: { inline: [ {}, {}, {}, {}, {}, {}, {}, {}, '@nuxt/test-utils' ] },
          defines: { __REACT_DEVTOOLS_GLOBAL_HOOK__: { isDisabled: true } },
          root: '<homeDir>/Projects/Inio/inio/web',
          snapshotOptions: { snapshotFormat: {}, updateSnapshot: 'new' },
          setupFiles: [],
          cache: { dir: '<homeDir>/Projects/Inio/inio/web/node_modules/.vitest' },
          sequence: {},
          package: {
            version: '0.17.1',
            urls: { hooks: 'file://<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/runners/node/hooks.mjs' },
            paths: { root: '<homeDir>/Projects/Inio/inio/web/node_modules/vitest', dist: '<homeDir>/Projects/Inio/inio/web/node_modules/vitest/dist' }
          }
        }
      }
    },
    testFramework: { version: 'vitest@0.14.0', configurator: 'vitest@0.14.0', reporter: 'vitest@0.14.0', starter: 'vitest@0.14.0', autoDetected: true },
    preserveComments: false,
    extractComments: true,
    files: [
      { pattern: '**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', ignore: true, trigger: true, load: true },
      { pattern: '**/node_modules/**', ignore: true, trigger: true, load: true },
      { pattern: '**/dist/**', ignore: true, trigger: true, load: true },
      { pattern: '**/cypress/**', ignore: true, trigger: true, load: true },
      { pattern: '**/.{idea,git,cache,output,temp}/**', ignore: true, trigger: true, load: true },
      { pattern: '**/*.*', ignore: false, trigger: true, load: true, order: 1 }
    ],
    tests: [
      { pattern: '**/node_modules/**', ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/dist/**', ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/cypress/**', ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/.{idea,git,cache,output,temp}/**', ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', ignore: false, trigger: true, load: true, test: true, order: 2 }
    ],
    workers: { initial: 1, regular: 1, recycle: false },
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    compilers: {},
    logLimits: { inline: { depth: 5, elements: 5000 }, values: { default: { stringLength: 200 }, autoExpand: { elements: 5000, stringLength: 8192, depth: 10 } } },
    preprocessors: {},
    maxConsoleMessagesPerTest: 100,
    autoConsoleLog: true,
    delays: { run: 0, edit: 100, update: 0 },
    teardown: undefined,
    hints: {
      ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
      ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
      commentAutoLog: '?',
      testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' }
    },
    automaticTestFileSelection: true,
    runSelectedTestsOnly: false,
    mapConsoleMessagesStackTrace: false,
    extensions: {},
    env: {
      type: 'node',
      params: { runner: '--experimental-loader=file://<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/runners/node/hooks.mjs' },
      runner: '<homeDir>/.fnm/node-versions/v16.15.1/installation/bin/node',
      viewportSize: { width: 800, height: 600 },
      options: { width: 800, height: 600 },
      bundle: true
    },
    reportUnhandledPromises: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: undefined,
    symlinkNodeModules: undefined,
    configCode: 'module.exports = function () {\n  return {\n    resolveGetters: true\n  };\n};\n'
  },
  packageJSON: {
    dependencies: {
      '@headlessui/react': '^1.6',
      '@popperjs/core': '^2.11.5',
      arangojs: '^7.6',
      axios: '^0.27',
      'fast-array-diff': '^1.0.1',
      'fractional-indexing': '^3.0',
      fuzzy: '^0.1',
      'hotkeys-js': '^3.8',
      inflection: '^1.13',
      mitt: '^3.0',
      nanoid: '^4.0',
      'next-tick': '^1.1',
      'prosemirror-autocomplete': 'https://github.com/tslocke/prosemirror-autocomplete',
      'prosemirror-commands': '^1.3',
      'prosemirror-dropcursor': '^1.5',
      'prosemirror-gapcursor': '^1.3',
      'prosemirror-history': '^1.3',
      'prosemirror-inputrules': '^1.2',
      'prosemirror-keymap': '^1.2',
      'prosemirror-model': '^1.18',
      'prosemirror-schema-list': '^1.2',
      'prosemirror-state': '^1.4',
      'prosemirror-transform': '^1.6',
      'prosemirror-view': '^1.26',
      'pusher-js': '^7.0',
      ramda: '^0.28',
      react: '^18.1',
      'react-dom': '^18.1',
      replicache: '^11.0',
      'solid-app-router': '^0.4',
      'solid-js': '^1.4',
      'tippy.js': '^6.3'
    },
    devDependencies: {
      '@tailwindcss/forms': '^0.5',
      '@tailwindcss/line-clamp': '^0.4',
      '@tailwindcss/typography': '^0.5',
      '@types/inflection': '^1.13.0',
      '@types/next-tick': '^1.0.0',
      '@types/node': '^17.0',
      '@types/object-inspect': '^1.8.1',
      '@types/ramda': '^0.28',
      '@types/react': '^18.0',
      '@types/react-dom': '^18.0',
      autoprefixer: '^10.4',
      jsdom: '^20.0.0',
      'json-beautify': '^1.1',
      'object-inspect': '^1.11',
      postcss: '^8.3',
      tailwindcss: '^3.1',
      'ts-unused-exports': '^8.0',
      'type-fest': '^2.12',
      typescript: '^4.5',
      vite: '^2.8',
      'vite-plugin-solid': '^2.2',
      'vite-tsconfig-paths': '^3.4',
      vitest: '^0.17'
    }
  },
  fs: { numberOfFiles: 118 },
  debug: [
    '2022-07-11T09:53:54.545Z angular/cli config Angular CLI not found.\n',
    "2022-07-11T09:53:54.546Z jest/config Error: Module jest-cli is not found in '<homeDir>/Projects/Inio/inio/web'.\n" +
      '    at Object.<anonymous> (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:31:9073)\n' +
      '    at r (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:30:24401)\n' +
      '    at Object.next (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:30:23696)\n' +
      '    at <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:30:23605\n' +
      '    at new Promise (<anonymous>)\n' +
      '    at n (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:30:23399)\n' +
      '    at Object.loadJest (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:31:6671)\n' +
      '    at <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:15370\n' +
      '    at r (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:20110)\n' +
      '    at Object.next (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:19405)\n' +
      '    at <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:19314\n' +
      '    at new Promise (<anonymous>)\n' +
      '    at s (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:19108)\n' +
      '    at r (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:15058)\n' +
      '    at <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:18785\n' +
      '    at r (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:20110)\n' +
      '    at Object.next (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:19405)\n' +
      '    at <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:19314\n' +
      '    at new Promise (<anonymous>)\n' +
      '    at s (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:19108)\n' +
      '    at n (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:19:18666)\n' +
      '    at Config.<anonymous> (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:15:20165)\n' +
      '    at r (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:15:12061)\n' +
      '    at Object.next (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:15:11356)\n' +
      '    at o (<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/wallaby3ab07b/server.js:15:11105)\n',
    '2022-07-11T09:53:54.548Z vitest/config Detected Vitest.\n',
    '2022-07-11T09:53:54.941Z project Wallaby Node version: v16.15.1\n',
    '2022-07-11T09:53:54.941Z project Wallaby config: <homeDir>/Projects/Inio/inio/web/wallaby.js\n',
    '2022-07-11T09:53:55.007Z project File cache: <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.338/projects/b6c1129a40e7d527\n',
    '2022-07-11T09:53:55.048Z uiService Listening port 51235\n',
    '2022-07-11T09:53:55.065Z workers Parallelism for initial run: 1, for regular run: 1\n',
    '2022-07-11T09:53:55.065Z workers Starting run worker instance #0\n',
    '2022-07-11T09:53:55.066Z workers Web server is listening at 59599\n',
    '2022-07-11T09:53:55.070Z project Stopping process pool\n',
    '2022-07-11T09:53:55.071Z project File cache is up-to-date, starting full test run\n',
    '2022-07-11T09:53:55.073Z project Test run started; run priority: 3\n',
    '2022-07-11T09:53:55.074Z project Running all tests\n',
    '2022-07-11T09:53:55.076Z workers Starting test run, priority: 3\n',
    '2022-07-11T09:53:55.076Z nodeRunner Starting sandbox [worker #0, session #965sr]\n',
    '2022-07-11T09:53:55.076Z nodeRunner Preparing sandbox [worker #0, session #965sr]\n',
    '2022-07-11T09:53:55.171Z workers Started run worker instance (delayed) #0\n',
    '2022-07-11T09:53:55.172Z nodeRunner Prepared sandbox [worker #0, session #965sr]\n',
    '2022-07-11T09:53:55.172Z workers [worker #0, session #965sr] Running tests in sandbox\n',
    '2022-07-11T09:53:55.402Z workers Scheduling Vitest Run (965sr): 2022-07-11T09:53:55.387Z\n',
    '2022-07-11T09:53:57.131Z workers Sandbox (active) [965sr] error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.132Z workers Sandbox (active) [965sr] error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.132Z workers [965sr.6] Loaded unknown number of test(s)\n',
    '2022-07-11T09:53:57.132Z workers Sandbox (active) [965sr] error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.132Z workers Sandbox (active) [965sr] error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.132Z workers Sandbox (active) [965sr] error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.133Z workers [965sr.3] Loaded unknown number of test(s)\n',
    '2022-07-11T09:53:57.133Z workers [965sr.4] Loaded unknown number of test(s)\n',
    '2022-07-11T09:53:57.133Z workers [965sr.5] Loaded unknown number of test(s)\n',
    '2022-07-11T09:53:57.133Z workers [965sr.7] Loaded unknown number of test(s)\n',
    '2022-07-11T09:53:57.133Z workers [965sr.1] Loaded unknown number of test(s)\n',
    '2022-07-11T09:53:57.153Z workers Sandbox (active) [965sr] error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (./node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.154Z workers [965sr.2] Loaded unknown number of test(s)\n',
    '2022-07-11T09:53:57.158Z workers Vitest Run Complete (965sr): 2022-07-11T09:53:57.157Z\n',
    '2022-07-11T09:53:57.160Z workers [965sr] Run 0 test(s), skipped 0 test(s)\n',
    '2022-07-11T09:53:57.161Z workers [965sr] Sandbox is responsive, closing it\n',
    '2022-07-11T09:53:57.161Z workers Failed to map the stack to user code, entry message: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension., stack: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.161Z workers Failed to map the stack to user code, entry message: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension., stack: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.161Z workers Failed to map the stack to user code, entry message: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension., stack: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.161Z workers Failed to map the stack to user code, entry message: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension., stack: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (<homeDir>/Projects/Inio/in\n',
    '2022-07-11T09:53:57.161Z workers Failed to map the stack to user code, entry message: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension., stack: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.161Z workers Failed to map the stack to user code, entry message: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension., stack: Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.\n' +
      '    at formatError (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39080:46)\n' +
      '    at TransformContext.error (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39076:19)\n' +
      '    at TransformContext.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:58294:22)\n' +
      '    at async Object.transform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:39317:30)\n' +
      '    at async doTransform (<homeDir>/Projects/Inio/inio/web/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:50037:29)\n',
    '2022-07-11T09:53:57.164Z project Test run finished\n',
    '2022-07-11T09:53:57.165Z project Processed console.log entries\n',
    '2022-07-11T09:53:57.165Z project Processed loading sequences\n',
    '2022-07-11T09:53:57.165Z project Processed executed tests\n',
    '2022-07-11T09:53:57.166Z project Processed code coverage\n',
    '2022-07-11T09:53:57.180Z project Test run result processed and sent to IDE\n',
    '2022-07-11T09:53:57.269Z fs No metadata for added file found: node_modules/.vitest/results.json\n'
  ]
}
tslocke commented 2 years ago

Update - I'm getting the same error with older revisions of my code, so nothing to do with vitest (was previously jest).

Not sure what changed to cause this - I did recently update the wallaby core version

tslocke commented 2 years ago

Here is the diagnostic report for an older revision that was previously working in Wallaby. It looks like the new version of Wallaby sees the vite.config.ts and assumes the framework is vitest.

{
  editorVersion: '1.67.2',
  pluginVersion: '1.0.344',
  editorType: 'VSCode',
  osVersion: 'darwin 21.4.0',
  nodeVersion: 'v16.15.1',
  coreVersion: '1.0.1299',
  checksum: 'MDY1YTZlY2QyZTAzNjNiNDliMmViMDE1ODI2MDE1NjMsMTY4MjcyNjQwMDAwMCww',
  config: {
    resolveGetters: true,
    diagnostics: {
      vitest: {
        file: {
          config: "import { defineConfig, loadEnv } from 'vite';\n" +
            "import solidPlugin from 'vite-plugin-solid';\n" +
            "import tsconfigPaths from 'vite-tsconfig-paths'\n" +
            '\n' +
            'export default defineConfig(({mode}) => ({\n' +
            '  plugins: [\n' +
            '    tsconfigPaths({loose: true}),\n' +
            '    solidPlugin()\n' +
            '  ],\n' +
            '  build: {\n' +
            "    target: 'esnext',\n" +
            '    polyfillDynamicImport: false,\n' +
            '    minify: false,\n' +
            '    chunkSizeWarningLimit: 600,\n' +
            '    rollupOptions: {\n' +
            "      input: './src/main.tsx',\n" +
            '      output: {\n' +
            '        assetFileNames: "[name][extname]",\n' +
            '        chunkFileNames: "[name].js",\n' +
            '        entryFileNames: "[name].js",\n' +
            '        manualChunks: () => "main.js"\n' +
            '      }\n' +
            '    }\n' +
            '  },\n' +
            '  define: {\n' +
            '    ...envWithProcessPrefix(mode),\n' +
            `    ...(mode == 'production' ? {} : {'__REACT_DEVTOOLS_GLOBAL_HOOK__': '{ "isDisabled": true }'})\n` +
            '  }\n' +
            '}))\n' +
            '\n' +
            'function envWithProcessPrefix(mode) {\n' +
            '  const env = loadEnv(mode, process.cwd())\n' +
            '\n' +
            '  return Object.entries(env).reduce(\n' +
            '    (prev, [key, val]) => {\n' +
            '      return {\n' +
            '        ...prev,\n' +
            '        [\'process.env.\' + key]: `"${val}"`,\n' +
            '      }\n' +
            '    },\n' +
            '    {},\n' +
            '  )\n' +
            '}\n'
        },
        config: {
          allowOnly: true,
          watch: true,
          globals: false,
          environment: 'node',
          threads: true,
          clearMocks: false,
          restoreMocks: false,
          mockReset: false,
          include: [ '**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}' ],
          exclude: [ '**/node_modules/**', '**/dist/**', '**/cypress/**', '**/.{idea,git,cache,output,temp}/**' ],
          testTimeout: 5000,
          hookTimeout: 10000,
          isolate: true,
          watchExclude: [ '**/node_modules/**', '**/dist/**' ],
          forceRerunTriggers: [ '**/package.json/**', '**/vitest.config.*/**', '**/vite.config.*/**' ],
          update: false,
          reporters: [ 'default' ],
          silent: false,
          ui: false,
          uiBase: '/__vitest__/',
          open: true,
          css: { include: [ {} ] },
          coverage: {
            enabled: false,
            clean: true,
            cleanOnRerun: false,
            reportsDirectory: '<homeDir>/Projects/Inio/inio/web/coverage',
            excludeNodeModules: true,
            exclude: [
              'coverage/**',
              'packages/*/test{,s}/**',
              '**/*.d.ts',
              'cypress/**',
              'test{,s}/**',
              'test{,-*}.{js,cjs,mjs,ts,tsx,jsx}',
              '**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}',
              '**/__tests__/**',
              '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc}.config.{js,cjs,mjs,ts}',
              '**/.{eslint,mocha,prettier}rc.{js,cjs,yml}'
            ],
            reporter: [ 'text', 'html' ],
            allowExternal: false,
            extension: [
              '.js',  '.cjs',
              '.mjs', '.ts',
              '.tsx', '.jsx',
              '.vue', '.svelte'
            ],
            tempDirectory: '<homeDir>/Projects/Inio/inio/web/coverage/tmp'
          },
          fakeTimers: { loopLimit: 10000, shouldClearNativeTimers: true, toFake: [ 'setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'setImmediate', 'clearImmediate', 'Date' ] },
          maxConcurrency: 5,
          defines: { __REACT_DEVTOOLS_GLOBAL_HOOK__: { isDisabled: true } },
          root: '<homeDir>/Projects/Inio/inio/web',
          deps: { inline: [ {}, {}, {}, {}, {}, {}, '@nuxt/test-utils' ] },
          snapshotOptions: { snapshotFormat: {}, updateSnapshot: 'new' },
          setupFiles: [],
          cache: { dir: '<homeDir>/Projects/Inio/inio/web/node_modules/.vitest' },
          sequence: {},
          package: {
            version: '0.18.0',
            urls: { hooks: 'file://<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.344/wallaby4e3442/runners/node/hooks.mjs' },
            paths: { root: '<homeDir>/Projects/Inio/inio/web/node_modules/vitest', dist: '<homeDir>/Projects/Inio/inio/web/node_modules/vitest/dist' }
          }
        }
      }
    },
    testFramework: { version: 'vitest@0.14.0', configurator: 'vitest@0.14.0', reporter: 'vitest@0.14.0', starter: 'vitest@0.14.0', autoDetected: true },
    preserveComments: false,
    extractComments: true,
    files: [
      { pattern: '**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', ignore: true, trigger: true, load: true },
      { pattern: '**/node_modules/**', ignore: true, trigger: true, load: true },
      { pattern: '**/dist/**', ignore: true, trigger: true, load: true },
      { pattern: '**/cypress/**', ignore: true, trigger: true, load: true },
      { pattern: '**/.{idea,git,cache,output,temp}/**', ignore: true, trigger: true, load: true },
      { pattern: '**/*.*', ignore: false, trigger: true, load: true, order: 1 }
    ],
    tests: [
      { pattern: '**/node_modules/**', ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/dist/**', ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/cypress/**', ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/.{idea,git,cache,output,temp}/**', ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', ignore: false, trigger: true, load: true, test: true, order: 2 }
    ],
    workers: { initial: 1, regular: 1, recycle: false },
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    compilers: {},
    logLimits: { inline: { depth: 5, elements: 5000 }, values: { default: { stringLength: 200 }, autoExpand: { elements: 5000, stringLength: 8192, depth: 10 } } },
    preprocessors: {},
    maxConsoleMessagesPerTest: 100,
    autoConsoleLog: true,
    delays: { run: 0, edit: 100, update: 0 },
    teardown: undefined,
    hints: {
      ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
      ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
      commentAutoLog: '?',
      testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' }
    },
    automaticTestFileSelection: true,
    runSelectedTestsOnly: false,
    mapConsoleMessagesStackTrace: false,
    extensions: {},
    env: {
      type: 'node',
      params: { runner: '--experimental-loader=file://<homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.344/wallaby4e3442/runners/node/hooks.mjs' },
      runner: '<homeDir>/.fnm/node-versions/v16.15.1/installation/bin/node',
      viewportSize: { width: 800, height: 600 },
      options: { width: 800, height: 600 },
      bundle: true
    },
    reportUnhandledPromises: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: undefined,
    symlinkNodeModules: undefined,
    configCode: 'module.exports = function () {\n  return {\n    resolveGetters: true\n  };\n};\n'
  },
  packageJSON: {
    dependencies: {
      '@headlessui/react': '^1.6',
      '@popperjs/core': '^2.11.5',
      arangojs: '^7.6',
      axios: '^0.27',
      'fast-array-diff': '^1.0.1',
      'fractional-indexing': '^3.0',
      fuzzy: '^0.1',
      'hotkeys-js': '^3.8',
      inflection: '^1.13',
      mitt: '^3.0',
      nanoid: '^3.3',
      'next-tick': '^1.1',
      'prosemirror-autocomplete': 'https://github.com/tslocke/prosemirror-autocomplete',
      'prosemirror-commands': '^1.3',
      'prosemirror-dropcursor': '^1.5',
      'prosemirror-gapcursor': '^1.3',
      'prosemirror-history': '^1.3',
      'prosemirror-inputrules': '^1.2',
      'prosemirror-keymap': '^1.2',
      'prosemirror-model': '^1.17',
      'prosemirror-schema-list': '^1.2',
      'prosemirror-state': '^1.4',
      'prosemirror-transform': '^1.6',
      'prosemirror-view': '^1.25',
      'pusher-js': '^7.0',
      ramda: '^0.28',
      react: '^18.1',
      'react-dom': '^18.1',
      replicache: '^10.0',
      'solid-app-router': '^0.3',
      'solid-js': '^1.3',
      'tippy.js': '^6.3'
    },
    devDependencies: {
      '@tailwindcss/forms': '^0.5',
      '@tailwindcss/line-clamp': '^0.4',
      '@tailwindcss/typography': '^0.5',
      '@types/inflection': '^1.13.0',
      '@types/jest': '^27.4.1',
      '@types/next-tick': '^1.0.0',
      '@types/node': '^17.0',
      '@types/object-inspect': '^1.8.1',
      '@types/ramda': '^0.28',
      '@types/react': '^18.0',
      '@types/react-dom': '^18.0',
      autoprefixer: '^10.4',
      jest: '^27.5',
      'json-beautify': '^1.1',
      'object-inspect': '^1.11',
      postcss: '^8.3',
      'solid-jest': '^0.2',
      tailwindcss: '^3.0',
      'ts-unused-exports': '^8.0',
      'type-fest': '^2.12',
      typescript: '^4.5',
      vite: '^2.8',
      'vite-plugin-solid': '^2.2',
      'vite-tsconfig-paths': '^3.4'
    }
  },
  fs: { numberOfFiles: 120 },
  debug: []
}
tslocke commented 2 years ago

I've tried adding testFramework: 'jest' to my wallaby.js (and double checking that config file was selected) and from the diagnostic report it still looks like it's detecting vitest as the test framework

smcenlly commented 2 years ago

I'm trying out vitest. Tests are passing from the command line, but as soon as I start Wallaby, I get

Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension. 

There's no indication of which file has the problem.


Update - I'm getting the same error with older revisions of my code, so nothing to do with vitest (was previously jest).

Not sure what changed to cause this - I did recently update the wallaby core version

We found a previous vitest issue where someone had the same problem.

Had that error on a Vite + Vue 3 + TS project recently when the files were accidentally compiled to .js files as well by my IDE. Removing the compiled files resolved it

Could you please check whether your .ts files are compiled to .js files along side (or even in a dist folder that may be used for running your tests) and try removing them?


Here is the diagnostic report for an older revision that was previously working in Wallaby. It looks like the new version of Wallaby sees the vite.config.ts and assumes the framework is vitest.

In your older version diagnostics report, your project dependencies include jest while your initial diagnostics report shows that you do not have jest installed, but you do have vitest installed. When Wallaby starts, it attempts to automatically configure your project's tests in the following order:

  1. Check for angular and configure to run Angular tests,
  2. If no angular, check for jest and configure to run Jest tests,
  3. If no jest, check for vitest and configure to run Vitest tests.

In your case, since you don't have jest installed as a project dependency, the check is failing and it falls through to trying to run your vitest tests.

I've tried adding testFramework: 'jest' to my wallaby.js (and double checking that config file was selected) and from the diagnostic report it still looks like it's detecting vitest as the test framework

Setting testFramework: 'jest' will use our legacy jest integration and should still fail for you if you have correctly specified to use your configuration file. If for some reason you have multiple testing frameworks installed and wanted to explicitly set the testing framework detection order, you may specify a configuration file as shown below. You can also remove items from the array to not attempt to detect a specific testing framework.

wallaby.js (configuration file)

module.exports = ({
  autoDetect: ['angular', 'jest', 'vitest'], // default detection order
});

I think our response will solve your problem. If not, please reply and we will reopen the issue.

tslocke commented 2 years ago

Thank you for the help

Re: the parsing error, I did have a dist folder with js inside but deleting it didn't help. Given that issue you linked is about regular vitest (i.e. not with Wallaby), bear in mind that running vitest on the command line is working fine for me. So the question is, what is different when it runs via Wallaby. I did see this comment on that thread:

I feel like this issue might have a simple cause: running vite in the wrong directory. It keeps happening to me but it's always because I'm not in my app's root folder

Could that be relevant?

I'll have a go at getting things running with jest again using your advice...

tslocke commented 2 years ago

OK I'm back up and running again with jest - must have messed up / missed a yarn install somewhere along the lines. Sorry for the noise. Thanks very much.

Would still be great to get vitest working

smcenlly commented 2 years ago

Would still be great to get vitest working

Are you able to share a repo that has the same problem that you're experiencing so we can try and work out why it's not working?

tslocke commented 2 years ago

I got it down to a pretty small repro: https://github.com/tslocke/vitest-wallaby-debug

The app is using SolidJS, BTW. See use of vite-plugin-solid in vite.config.js. I'm guessing that might be a combination you've not tested.

yarn test works, Wallaby hits a parse failure.

The error message changed to something more specific at a certain point while I was stripping away the irrelevant stuff in my codebase, but I'm fairly sure this is the same issue.

smcenlly commented 2 years ago

Thanks for the sample repo. The parse error is from some additional instructions that Wallaby is adding to your code to capture code coverage. Not sure yet why it's failing as it is valid syntax. Will report back when we work it out.

smcenlly commented 2 years ago

Thanks for the sample repo. The problem was indeed with vitest-plugin-solid. When Wallaby runs code in vitest, it needs to add a cachebreaker to the end of the file URLs (e.g. /src/component.tsx?wallaby=${file.change.timestamp}). The vitest-plugin-solid getExtension() logic is simple and doesn't handle this case properly. Wallaby now patches vitest-plugin-solid at runtime to fix this problem.

Please update to the latest version fo Wallaby core, v1.0.1301, it will fix your problem.

tslocke commented 2 years ago

Thanks for going above and beyond here : )

The parse bug does seem to be fixed, but I have another issue. It seems Wallaby is treating .tsx files as .jsx

I've added a commit to the same repo to illustrate the problem - it just adds some typescript syntax to the tsx file.

With this commit, I get

SyntaxError: ./src/component.tsx?wallaby=...: Unexpected token, expected "," (1:25)

p.s. I'll open an issue on vitest-plugin-solid.

smcenlly commented 2 years ago

Thanks for letting us know about your other issue. There was another place we needed to patch vite-plugin-solid. This has been fixed in Wallaby core v1.0.1302.

p.s. I'll open an issue on vitest-plugin-solid.

I'm not entirely sure that appending the cache breaker to the path is necessarily something that they should support. While it's possible and fully supported by file URI, it may be something specific to Wallaby.

tslocke commented 2 years ago

Thanks very much for great support here. All working now. I had another issue related to loading multiple instances of modules, but I was able to work around it. I have a question about that but I'll post separately.