diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 61cf4f2..ff31e39 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -8,7 +8,7 @@ ], // E2E fixtures deliberately pin the published toolchain versions the suites // run against; bumping them is a manual, E2E-verified decision. - ignorePaths: ['**/node_modules/**', 'packages/vscode/tests/**'], + ignorePaths: ['**/node_modules/**', 'packages/vscode/e2e/**'], packageRules: [ // Use chore as semantic commit type for commit messages { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7ecacc..db5b4f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,7 @@ jobs: vscode-test-${{ runner.os }}- # The E2E fixtures install published npm packages at test time - # (tests/e2e/setupFixtures.mjs, invoked by test:e2e), so this step needs + # (e2e/setupFixtures.mjs, invoked by test:e2e), so this step needs # network access. - name: E2E Test run: pnpm run test:e2e diff --git a/.gitignore b/.gitignore index 220bfa5..ec4cea7 100644 --- a/.gitignore +++ b/.gitignore @@ -149,10 +149,10 @@ tests-dist/ # E2E fixtures install published npm versions on demand; only # their manifests and configs are tracked. -packages/vscode/tests/e2e/fixtures/*/node_modules/ -packages/vscode/tests/e2e/fixtures/*/pnpm-lock.yaml -packages/vscode/tests/e2e/lint/fixtures/pnpm-lock.yaml -packages/vscode/tests/e2e/rstest/fixtures/*/pnpm-lock.yaml +packages/vscode/e2e/fixtures/*/node_modules/ +packages/vscode/e2e/fixtures/*/pnpm-lock.yaml +packages/vscode/e2e/lint/fixtures/pnpm-lock.yaml +packages/vscode/e2e/rstest/fixtures/*/pnpm-lock.yaml # Build-time copy of the workspace root LICENSE (see rslib.config.mts) packages/vscode/LICENSE diff --git a/.vscode/launch.json b/.vscode/launch.json index 62d990c..c656c1b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -45,15 +45,15 @@ "id": "playgroundTarget", "type": "pickString", "description": "Which fixture should the dev host open?", - "default": "tests/e2e/fixtures/e2e.code-workspace", + "default": "e2e/fixtures/e2e.code-workspace", "options": [ { "label": "all three fixtures (multi-root)", - "value": "tests/e2e/fixtures/e2e.code-workspace" + "value": "e2e/fixtures/e2e.code-workspace" }, - { "label": "rslint fixture", "value": "tests/e2e/fixtures/rslint" }, - { "label": "rstest fixture", "value": "tests/e2e/fixtures/rstest" }, - { "label": "rstack fixture", "value": "tests/e2e/fixtures/rstack" } + { "label": "rslint fixture", "value": "e2e/fixtures/rslint" }, + { "label": "rstest fixture", "value": "e2e/fixtures/rstest" }, + { "label": "rstack fixture", "value": "e2e/fixtures/rstack" } ] } ] diff --git a/README.md b/README.md index 994f084..3c2a829 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ Rstack Editor provides unified editor support for [Rstack](https://rstack.rs), the fast, unified JavaScript toolchain for developers and agents. It integrates [Rslint](https://github.com/web-infra-dev/rslint), [Rstest](https://github.com/web-infra-dev/rstest) and [rstack-cli](https://github.com/rstackjs/rstack-cli) into a single extension, so one install covers the whole toolchain. +> [!IMPORTANT] +> +> **Work in progress.** Rstack Editor is pre-1.0 and under active development. Settings, command ids and behavior can change between releases, and not every config source is wired up yet — see the roadmap below for what works today. Bug reports and feedback are very welcome. + ## Packages | Name | Description | diff --git a/packages/vscode/tests/e2e/fixtures/.gitattributes b/packages/vscode/e2e/fixtures/.gitattributes similarity index 100% rename from packages/vscode/tests/e2e/fixtures/.gitattributes rename to packages/vscode/e2e/fixtures/.gitattributes diff --git a/packages/vscode/tests/e2e/fixtures/e2e.code-workspace b/packages/vscode/e2e/fixtures/e2e.code-workspace similarity index 100% rename from packages/vscode/tests/e2e/fixtures/e2e.code-workspace rename to packages/vscode/e2e/fixtures/e2e.code-workspace diff --git a/packages/vscode/tests/e2e/fixtures/rslint/local-plugin.mjs b/packages/vscode/e2e/fixtures/rslint/local-plugin.mjs similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rslint/local-plugin.mjs rename to packages/vscode/e2e/fixtures/rslint/local-plugin.mjs diff --git a/packages/vscode/tests/e2e/fixtures/rslint/package.json b/packages/vscode/e2e/fixtures/rslint/package.json similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rslint/package.json rename to packages/vscode/e2e/fixtures/rslint/package.json diff --git a/packages/vscode/tests/e2e/fixtures/rslint/rslint.config.mjs b/packages/vscode/e2e/fixtures/rslint/rslint.config.mjs similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rslint/rslint.config.mjs rename to packages/vscode/e2e/fixtures/rslint/rslint.config.mjs diff --git a/packages/vscode/tests/e2e/fixtures/rslint/src/index.ts b/packages/vscode/e2e/fixtures/rslint/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rslint/src/index.ts rename to packages/vscode/e2e/fixtures/rslint/src/index.ts diff --git a/packages/vscode/tests/e2e/fixtures/rstack/.npmrc b/packages/vscode/e2e/fixtures/rstack/.npmrc similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstack/.npmrc rename to packages/vscode/e2e/fixtures/rstack/.npmrc diff --git a/packages/vscode/tests/e2e/fixtures/rstack/.vscode/settings.json b/packages/vscode/e2e/fixtures/rstack/.vscode/settings.json similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstack/.vscode/settings.json rename to packages/vscode/e2e/fixtures/rstack/.vscode/settings.json diff --git a/packages/vscode/tests/e2e/fixtures/rstack/package.json b/packages/vscode/e2e/fixtures/rstack/package.json similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstack/package.json rename to packages/vscode/e2e/fixtures/rstack/package.json diff --git a/packages/vscode/tests/e2e/fixtures/rstack/rstack.config.ts b/packages/vscode/e2e/fixtures/rstack/rstack.config.ts similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstack/rstack.config.ts rename to packages/vscode/e2e/fixtures/rstack/rstack.config.ts diff --git a/packages/vscode/tests/e2e/fixtures/rstack/src/index.ts b/packages/vscode/e2e/fixtures/rstack/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstack/src/index.ts rename to packages/vscode/e2e/fixtures/rstack/src/index.ts diff --git a/packages/vscode/tests/e2e/fixtures/rstack/src/needs-format.ts b/packages/vscode/e2e/fixtures/rstack/src/needs-format.ts similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstack/src/needs-format.ts rename to packages/vscode/e2e/fixtures/rstack/src/needs-format.ts diff --git a/packages/vscode/tests/e2e/fixtures/rstack/tests/basic.test.ts b/packages/vscode/e2e/fixtures/rstack/tests/basic.test.ts similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstack/tests/basic.test.ts rename to packages/vscode/e2e/fixtures/rstack/tests/basic.test.ts diff --git a/packages/vscode/tests/e2e/fixtures/rstest/package.json b/packages/vscode/e2e/fixtures/rstest/package.json similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstest/package.json rename to packages/vscode/e2e/fixtures/rstest/package.json diff --git a/packages/vscode/tests/e2e/fixtures/rstest/rstest.config.ts b/packages/vscode/e2e/fixtures/rstest/rstest.config.ts similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstest/rstest.config.ts rename to packages/vscode/e2e/fixtures/rstest/rstest.config.ts diff --git a/packages/vscode/tests/e2e/fixtures/rstest/tests/basic.test.ts b/packages/vscode/e2e/fixtures/rstest/tests/basic.test.ts similarity index 100% rename from packages/vscode/tests/e2e/fixtures/rstest/tests/basic.test.ts rename to packages/vscode/e2e/fixtures/rstest/tests/basic.test.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/.gitignore b/packages/vscode/e2e/lint/fixtures/basic/.gitignore similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/.gitignore rename to packages/vscode/e2e/lint/fixtures/basic/.gitignore diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/rslint.config.mjs b/packages/vscode/e2e/lint/fixtures/basic/rslint.config.mjs similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/rslint.config.mjs rename to packages/vscode/e2e/lint/fixtures/basic/rslint.config.mjs diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/autofix.ts b/packages/vscode/e2e/lint/fixtures/basic/src/autofix.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/autofix.ts rename to packages/vscode/e2e/lint/fixtures/basic/src/autofix.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/close-test.ts b/packages/vscode/e2e/lint/fixtures/basic/src/close-test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/close-test.ts rename to packages/vscode/e2e/lint/fixtures/basic/src/close-test.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/disable-file.ts b/packages/vscode/e2e/lint/fixtures/basic/src/disable-file.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/disable-file.ts rename to packages/vscode/e2e/lint/fixtures/basic/src/disable-file.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/disable.ts b/packages/vscode/e2e/lint/fixtures/basic/src/disable.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/disable.ts rename to packages/vscode/e2e/lint/fixtures/basic/src/disable.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/error-transitions.ts b/packages/vscode/e2e/lint/fixtures/basic/src/error-transitions.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/error-transitions.ts rename to packages/vscode/e2e/lint/fixtures/basic/src/error-transitions.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/fixall-cascade.ts b/packages/vscode/e2e/lint/fixtures/basic/src/fixall-cascade.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/fixall-cascade.ts rename to packages/vscode/e2e/lint/fixtures/basic/src/fixall-cascade.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/fixall.ts b/packages/vscode/e2e/lint/fixtures/basic/src/fixall.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/fixall.ts rename to packages/vscode/e2e/lint/fixtures/basic/src/fixall.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/gitignored.ts b/packages/vscode/e2e/lint/fixtures/basic/src/gitignored.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/gitignored.ts rename to packages/vscode/e2e/lint/fixtures/basic/src/gitignored.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/index.ts b/packages/vscode/e2e/lint/fixtures/basic/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/index.ts rename to packages/vscode/e2e/lint/fixtures/basic/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/src/styles.css b/packages/vscode/e2e/lint/fixtures/basic/src/styles.css similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/src/styles.css rename to packages/vscode/e2e/lint/fixtures/basic/src/styles.css diff --git a/packages/vscode/tests/e2e/lint/fixtures/basic/tsconfig.json b/packages/vscode/e2e/lint/fixtures/basic/tsconfig.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/basic/tsconfig.json rename to packages/vscode/e2e/lint/fixtures/basic/tsconfig.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/eslint-plugins/local-plugin.mjs b/packages/vscode/e2e/lint/fixtures/eslint-plugins/local-plugin.mjs similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/eslint-plugins/local-plugin.mjs rename to packages/vscode/e2e/lint/fixtures/eslint-plugins/local-plugin.mjs diff --git a/packages/vscode/tests/e2e/lint/fixtures/eslint-plugins/rslint.config.mjs b/packages/vscode/e2e/lint/fixtures/eslint-plugins/rslint.config.mjs similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/eslint-plugins/rslint.config.mjs rename to packages/vscode/e2e/lint/fixtures/eslint-plugins/rslint.config.mjs diff --git a/packages/vscode/tests/e2e/lint/fixtures/eslint-plugins/src/index.ts b/packages/vscode/e2e/lint/fixtures/eslint-plugins/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/eslint-plugins/src/index.ts rename to packages/vscode/e2e/lint/fixtures/eslint-plugins/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/eslint-plugins/tsconfig.json b/packages/vscode/e2e/lint/fixtures/eslint-plugins/tsconfig.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/eslint-plugins/tsconfig.json rename to packages/vscode/e2e/lint/fixtures/eslint-plugins/tsconfig.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/jsconfig/rslint.config.js b/packages/vscode/e2e/lint/fixtures/jsconfig/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/jsconfig/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/jsconfig/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/jsconfig/rslint.json b/packages/vscode/e2e/lint/fixtures/jsconfig/rslint.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/jsconfig/rslint.json rename to packages/vscode/e2e/lint/fixtures/jsconfig/rslint.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/jsconfig/src/index.ts b/packages/vscode/e2e/lint/fixtures/jsconfig/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/jsconfig/src/index.ts rename to packages/vscode/e2e/lint/fixtures/jsconfig/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/jsconfig/tsconfig.json b/packages/vscode/e2e/lint/fixtures/jsconfig/tsconfig.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/jsconfig/tsconfig.json rename to packages/vscode/e2e/lint/fixtures/jsconfig/tsconfig.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/bar/src/index.ts b/packages/vscode/e2e/lint/fixtures/monorepo/packages/bar/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/bar/src/index.ts rename to packages/vscode/e2e/lint/fixtures/monorepo/packages/bar/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/broken/rslint.config.js b/packages/vscode/e2e/lint/fixtures/monorepo/packages/broken/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/broken/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/monorepo/packages/broken/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/broken/src/index.ts b/packages/vscode/e2e/lint/fixtures/monorepo/packages/broken/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/broken/src/index.ts rename to packages/vscode/e2e/lint/fixtures/monorepo/packages/broken/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/foo/rslint.config.js b/packages/vscode/e2e/lint/fixtures/monorepo/packages/foo/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/foo/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/monorepo/packages/foo/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/foo/src/index.ts b/packages/vscode/e2e/lint/fixtures/monorepo/packages/foo/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/monorepo/packages/foo/src/index.ts rename to packages/vscode/e2e/lint/fixtures/monorepo/packages/foo/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/monorepo/rslint.config.js b/packages/vscode/e2e/lint/fixtures/monorepo/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/monorepo/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/monorepo/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/monorepo/src/index.ts b/packages/vscode/e2e/lint/fixtures/monorepo/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/monorepo/src/index.ts rename to packages/vscode/e2e/lint/fixtures/monorepo/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/monorepo/tsconfig.json b/packages/vscode/e2e/lint/fixtures/monorepo/tsconfig.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/monorepo/tsconfig.json rename to packages/vscode/e2e/lint/fixtures/monorepo/tsconfig.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/multiroot.code-workspace b/packages/vscode/e2e/lint/fixtures/multiroot/multiroot.code-workspace similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/multiroot.code-workspace rename to packages/vscode/e2e/lint/fixtures/multiroot/multiroot.code-workspace diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/nested-initial.code-workspace b/packages/vscode/e2e/lint/fixtures/multiroot/nested-initial.code-workspace similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/nested-initial.code-workspace rename to packages/vscode/e2e/lint/fixtures/multiroot/nested-initial.code-workspace diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/parent/nested/rslint.config.js b/packages/vscode/e2e/lint/fixtures/multiroot/parent/nested/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/parent/nested/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/multiroot/parent/nested/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/parent/nested/src/index.ts b/packages/vscode/e2e/lint/fixtures/multiroot/parent/nested/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/parent/nested/src/index.ts rename to packages/vscode/e2e/lint/fixtures/multiroot/parent/nested/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/parent/rslint.config.js b/packages/vscode/e2e/lint/fixtures/multiroot/parent/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/parent/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/multiroot/parent/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/parent/src/index.ts b/packages/vscode/e2e/lint/fixtures/multiroot/parent/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/parent/src/index.ts rename to packages/vscode/e2e/lint/fixtures/multiroot/parent/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/sentinel/rslint.config.js b/packages/vscode/e2e/lint/fixtures/multiroot/sentinel/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/sentinel/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/multiroot/sentinel/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/sentinel/src/index.ts b/packages/vscode/e2e/lint/fixtures/multiroot/sentinel/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/sentinel/src/index.ts rename to packages/vscode/e2e/lint/fixtures/multiroot/sentinel/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/twins/left/app/rslint.config.js b/packages/vscode/e2e/lint/fixtures/multiroot/twins/left/app/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/twins/left/app/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/multiroot/twins/left/app/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/twins/left/app/src/index.ts b/packages/vscode/e2e/lint/fixtures/multiroot/twins/left/app/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/twins/left/app/src/index.ts rename to packages/vscode/e2e/lint/fixtures/multiroot/twins/left/app/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/twins/right/app/rslint.config.js b/packages/vscode/e2e/lint/fixtures/multiroot/twins/right/app/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/twins/right/app/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/multiroot/twins/right/app/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/multiroot/twins/right/app/src/index.ts b/packages/vscode/e2e/lint/fixtures/multiroot/twins/right/app/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/multiroot/twins/right/app/src/index.ts rename to packages/vscode/e2e/lint/fixtures/multiroot/twins/right/app/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/noconfig/src/index.ts b/packages/vscode/e2e/lint/fixtures/noconfig/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/noconfig/src/index.ts rename to packages/vscode/e2e/lint/fixtures/noconfig/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/noconfig/tsconfig.json b/packages/vscode/e2e/lint/fixtures/noconfig/tsconfig.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/noconfig/tsconfig.json rename to packages/vscode/e2e/lint/fixtures/noconfig/tsconfig.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/package.json b/packages/vscode/e2e/lint/fixtures/package.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/package.json rename to packages/vscode/e2e/lint/fixtures/package.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/project-service-scope/rslint.config.js b/packages/vscode/e2e/lint/fixtures/project-service-scope/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/project-service-scope/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/project-service-scope/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/project-service-scope/src/covered.ts b/packages/vscode/e2e/lint/fixtures/project-service-scope/src/covered.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/project-service-scope/src/covered.ts rename to packages/vscode/e2e/lint/fixtures/project-service-scope/src/covered.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/project-service-scope/template-nested/orphan.ts b/packages/vscode/e2e/lint/fixtures/project-service-scope/template-nested/orphan.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/project-service-scope/template-nested/orphan.ts rename to packages/vscode/e2e/lint/fixtures/project-service-scope/template-nested/orphan.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/project-service-scope/template-nested/rslint.config.js b/packages/vscode/e2e/lint/fixtures/project-service-scope/template-nested/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/project-service-scope/template-nested/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/project-service-scope/template-nested/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/fixtures/project-service-scope/test/skills.test.ts b/packages/vscode/e2e/lint/fixtures/project-service-scope/test/skills.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/project-service-scope/test/skills.test.ts rename to packages/vscode/e2e/lint/fixtures/project-service-scope/test/skills.test.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/project-service-scope/tsconfig.json b/packages/vscode/e2e/lint/fixtures/project-service-scope/tsconfig.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/project-service-scope/tsconfig.json rename to packages/vscode/e2e/lint/fixtures/project-service-scope/tsconfig.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/cli/src/preview.ts b/packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/cli/src/preview.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/cli/src/preview.ts rename to packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/cli/src/preview.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/src/dependency.ts b/packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/src/dependency.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/src/dependency.ts rename to packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/src/dependency.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/src/index.ts b/packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/src/index.ts rename to packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/src/index.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/src/session.ts b/packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/src/session.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/src/session.ts rename to packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/src/session.ts diff --git a/packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/tsconfig.json b/packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/tsconfig.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/tsconfig.json rename to packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/tsconfig.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/tsconfig.lint.json b/packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/tsconfig.lint.json similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/packages/core/tsconfig.lint.json rename to packages/vscode/e2e/lint/fixtures/type-aware-scope/packages/core/tsconfig.lint.json diff --git a/packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/rslint.config.js b/packages/vscode/e2e/lint/fixtures/type-aware-scope/rslint.config.js similarity index 100% rename from packages/vscode/tests/e2e/lint/fixtures/type-aware-scope/rslint.config.js rename to packages/vscode/e2e/lint/fixtures/type-aware-scope/rslint.config.js diff --git a/packages/vscode/tests/e2e/lint/runSuite.ts b/packages/vscode/e2e/lint/runSuite.ts similarity index 99% rename from packages/vscode/tests/e2e/lint/runSuite.ts rename to packages/vscode/e2e/lint/runSuite.ts index 87ce2e8..6880e0f 100644 --- a/packages/vscode/tests/e2e/lint/runSuite.ts +++ b/packages/vscode/e2e/lint/runSuite.ts @@ -19,7 +19,7 @@ import * as vscode from 'vscode'; import { isCodeActionCancellation } from './utils/codeActionRegistry'; import { runBeforeDeadline } from './utils/deadline'; import { EXTENSION_ID, workspaceMarkerFile } from './utils/extension'; -import type { RstackExtensionExports } from '../../../src/types'; +import type { RstackExtensionExports } from '../../src/types'; const startupTimeoutMs = 120_000; const typescriptCodeActionProbeSource = `interface RslintCodeActionProbe { diff --git a/packages/vscode/tests/e2e/lint/runTest.ts b/packages/vscode/e2e/lint/runTest.ts similarity index 97% rename from packages/vscode/tests/e2e/lint/runTest.ts rename to packages/vscode/e2e/lint/runTest.ts index 02d9ecc..42c9fc3 100644 --- a/packages/vscode/tests/e2e/lint/runTest.ts +++ b/packages/vscode/e2e/lint/runTest.ts @@ -13,7 +13,7 @@ * `dist/extension.js`. * - There is no built-in binary: every fixture resolves * `@rslint/core` — including its native Go binary — from the shared fixture - * install root (`tests/e2e/lint/fixtures/package.json`, published npm + * install root (`e2e/lint/fixtures/package.json`, published npm * versions). The sandbox preserves that resolution the way * upstream preserved its monorepo package boundary: the install root's * `package.json` is copied next to the workspace copy and its `node_modules` @@ -178,12 +178,9 @@ async function runIsolatedSuite( } async function main(): Promise { - // `__dirname` is `/tests-dist/tests/e2e/lint` (see tsconfig.e2e.json). - const extensionDevelopmentPath = path.resolve(__dirname, '../../../..'); - const fixturesRoot = path.join( - extensionDevelopmentPath, - 'tests/e2e/lint/fixtures', - ); + // `__dirname` is `/tests-dist/e2e/lint` (see tsconfig.e2e.json). + const extensionDevelopmentPath = path.resolve(__dirname, '../../..'); + const fixturesRoot = path.join(extensionDevelopmentPath, 'e2e/lint/fixtures'); const fixture = (name: string): string => path.join(fixturesRoot, name); const suiteDir = (name: string): string => path.resolve(__dirname, name); diff --git a/packages/vscode/tests/e2e/lint/suite-eslint-plugins/eslint-plugins.test.ts b/packages/vscode/e2e/lint/suite-eslint-plugins/eslint-plugins.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-eslint-plugins/eslint-plugins.test.ts rename to packages/vscode/e2e/lint/suite-eslint-plugins/eslint-plugins.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite-eslint-plugins/index.ts b/packages/vscode/e2e/lint/suite-eslint-plugins/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-eslint-plugins/index.ts rename to packages/vscode/e2e/lint/suite-eslint-plugins/index.ts diff --git a/packages/vscode/tests/e2e/lint/suite-eslint-plugins/plugin-pool.test.ts b/packages/vscode/e2e/lint/suite-eslint-plugins/plugin-pool.test.ts similarity index 98% rename from packages/vscode/tests/e2e/lint/suite-eslint-plugins/plugin-pool.test.ts rename to packages/vscode/e2e/lint/suite-eslint-plugins/plugin-pool.test.ts index f067f44..dfd78da 100644 --- a/packages/vscode/tests/e2e/lint/suite-eslint-plugins/plugin-pool.test.ts +++ b/packages/vscode/e2e/lint/suite-eslint-plugins/plugin-pool.test.ts @@ -14,8 +14,8 @@ import type { PluginLintHost, } from '@rslint/core/eslint-plugin'; import { CancellationTokenSource } from 'vscode'; -import { PluginLintPool } from '../../../../src/stacks/lint/PluginLintPool'; -import type { Logger } from '../../../../src/stacks/lint/logger'; +import { PluginLintPool } from '../../../src/stacks/lint/PluginLintPool'; +import type { Logger } from '../../../src/stacks/lint/logger'; function deferred(): { promise: Promise; diff --git a/packages/vscode/tests/e2e/lint/suite-jsconfig/config-transaction.test.ts b/packages/vscode/e2e/lint/suite-jsconfig/config-transaction.test.ts similarity index 99% rename from packages/vscode/tests/e2e/lint/suite-jsconfig/config-transaction.test.ts rename to packages/vscode/e2e/lint/suite-jsconfig/config-transaction.test.ts index e28145f..112db8f 100644 --- a/packages/vscode/tests/e2e/lint/suite-jsconfig/config-transaction.test.ts +++ b/packages/vscode/e2e/lint/suite-jsconfig/config-transaction.test.ts @@ -27,8 +27,8 @@ import { isConfigSourceChangeDuringTransaction, recoverConfigDiscoveryOnServerState, retryConfigRefreshOnSourceChange, -} from '../../../../src/stacks/lint/Rslint'; -import { LspConfigTransactionAdapter } from '../../../../src/stacks/lint/ConfigTransactionAdapter'; +} from '../../../src/stacks/lint/Rslint'; +import { LspConfigTransactionAdapter } from '../../../src/stacks/lint/ConfigTransactionAdapter'; import { State } from 'vscode-languageclient/node'; import { RelativePattern, diff --git a/packages/vscode/tests/e2e/lint/suite-jsconfig/index.ts b/packages/vscode/e2e/lint/suite-jsconfig/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-jsconfig/index.ts rename to packages/vscode/e2e/lint/suite-jsconfig/index.ts diff --git a/packages/vscode/tests/e2e/lint/suite-jsconfig/jsconfig.test.ts b/packages/vscode/e2e/lint/suite-jsconfig/jsconfig.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-jsconfig/jsconfig.test.ts rename to packages/vscode/e2e/lint/suite-jsconfig/jsconfig.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite-jsconfig/rslint-lifecycle.test.ts b/packages/vscode/e2e/lint/suite-jsconfig/rslint-lifecycle.test.ts similarity index 97% rename from packages/vscode/tests/e2e/lint/suite-jsconfig/rslint-lifecycle.test.ts rename to packages/vscode/e2e/lint/suite-jsconfig/rslint-lifecycle.test.ts index 7cd3a4e..97f4162 100644 --- a/packages/vscode/tests/e2e/lint/suite-jsconfig/rslint-lifecycle.test.ts +++ b/packages/vscode/e2e/lint/suite-jsconfig/rslint-lifecycle.test.ts @@ -5,13 +5,13 @@ import * as assert from 'node:assert'; import { window } from 'vscode'; import { CloseAction, ErrorAction, State } from 'vscode-languageclient/node'; -import { LanguageServerProcessOwner } from '../../../../src/stacks/lint/LanguageServerProcessOwner'; +import { LanguageServerProcessOwner } from '../../../src/stacks/lint/LanguageServerProcessOwner'; import { disposeLanguageClient, ManagedLanguageClient, shouldResetDocumentSessionOnServerState, waitForPromiseSettlement, -} from '../../../../src/stacks/lint/Rslint'; +} from '../../../src/stacks/lint/Rslint'; const FORCE_KILL_CHILD = "process.on('SIGTERM', () => undefined); setTimeout(() => process.stdout.write('ready\\n'), 20); setInterval(() => undefined, 1_000)"; diff --git a/packages/vscode/tests/e2e/lint/suite-jsconfig/workspace-coordinator.test.ts b/packages/vscode/e2e/lint/suite-jsconfig/workspace-coordinator.test.ts similarity index 99% rename from packages/vscode/tests/e2e/lint/suite-jsconfig/workspace-coordinator.test.ts rename to packages/vscode/e2e/lint/suite-jsconfig/workspace-coordinator.test.ts index 757cf55..1219738 100644 --- a/packages/vscode/tests/e2e/lint/suite-jsconfig/workspace-coordinator.test.ts +++ b/packages/vscode/e2e/lint/suite-jsconfig/workspace-coordinator.test.ts @@ -15,7 +15,7 @@ import { type WorkspaceCoordinatorLogger, type WorkspaceRootRouter, type WorkspaceRuntime, -} from '../../../../src/stacks/lint/WorkspaceRslintCoordinator'; +} from '../../../src/stacks/lint/WorkspaceRslintCoordinator'; type StartMode = 'ready' | 'fail' | 'pending' | 'factory-fail'; diff --git a/packages/vscode/tests/e2e/lint/suite-jsconfig/workspace-router.test.ts b/packages/vscode/e2e/lint/suite-jsconfig/workspace-router.test.ts similarity index 99% rename from packages/vscode/tests/e2e/lint/suite-jsconfig/workspace-router.test.ts rename to packages/vscode/e2e/lint/suite-jsconfig/workspace-router.test.ts index 941c3b3..2de2e05 100644 --- a/packages/vscode/tests/e2e/lint/suite-jsconfig/workspace-router.test.ts +++ b/packages/vscode/e2e/lint/suite-jsconfig/workspace-router.test.ts @@ -16,7 +16,7 @@ import { import { WorkspaceDocumentRouter, type DocumentRoutingRuntime, -} from '../../../../src/stacks/lint/WorkspaceDocumentRouter'; +} from '../../../src/stacks/lint/WorkspaceDocumentRouter'; class FakeRoutingRuntime implements DocumentRoutingRuntime { readonly events: string[] = []; diff --git a/packages/vscode/tests/e2e/lint/suite-monorepo/index.ts b/packages/vscode/e2e/lint/suite-monorepo/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-monorepo/index.ts rename to packages/vscode/e2e/lint/suite-monorepo/index.ts diff --git a/packages/vscode/tests/e2e/lint/suite-monorepo/monorepo.test.ts b/packages/vscode/e2e/lint/suite-monorepo/monorepo.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-monorepo/monorepo.test.ts rename to packages/vscode/e2e/lint/suite-monorepo/monorepo.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite-multiroot/index.ts b/packages/vscode/e2e/lint/suite-multiroot/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-multiroot/index.ts rename to packages/vscode/e2e/lint/suite-multiroot/index.ts diff --git a/packages/vscode/tests/e2e/lint/suite-multiroot/multiroot.test.ts b/packages/vscode/e2e/lint/suite-multiroot/multiroot.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-multiroot/multiroot.test.ts rename to packages/vscode/e2e/lint/suite-multiroot/multiroot.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite-noconfig/index.ts b/packages/vscode/e2e/lint/suite-noconfig/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-noconfig/index.ts rename to packages/vscode/e2e/lint/suite-noconfig/index.ts diff --git a/packages/vscode/tests/e2e/lint/suite-noconfig/noconfig.test.ts b/packages/vscode/e2e/lint/suite-noconfig/noconfig.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-noconfig/noconfig.test.ts rename to packages/vscode/e2e/lint/suite-noconfig/noconfig.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite-project-service-scope/index.ts b/packages/vscode/e2e/lint/suite-project-service-scope/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-project-service-scope/index.ts rename to packages/vscode/e2e/lint/suite-project-service-scope/index.ts diff --git a/packages/vscode/tests/e2e/lint/suite-project-service-scope/project-service-scope.test.ts b/packages/vscode/e2e/lint/suite-project-service-scope/project-service-scope.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-project-service-scope/project-service-scope.test.ts rename to packages/vscode/e2e/lint/suite-project-service-scope/project-service-scope.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite-type-aware-scope/index.ts b/packages/vscode/e2e/lint/suite-type-aware-scope/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-type-aware-scope/index.ts rename to packages/vscode/e2e/lint/suite-type-aware-scope/index.ts diff --git a/packages/vscode/tests/e2e/lint/suite-type-aware-scope/type-aware-scope.test.ts b/packages/vscode/e2e/lint/suite-type-aware-scope/type-aware-scope.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite-type-aware-scope/type-aware-scope.test.ts rename to packages/vscode/e2e/lint/suite-type-aware-scope/type-aware-scope.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite/extension.test.ts b/packages/vscode/e2e/lint/suite/extension.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite/extension.test.ts rename to packages/vscode/e2e/lint/suite/extension.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite/fixall-cascade.test.ts b/packages/vscode/e2e/lint/suite/fixall-cascade.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite/fixall-cascade.test.ts rename to packages/vscode/e2e/lint/suite/fixall-cascade.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite/fixall-error.test.ts b/packages/vscode/e2e/lint/suite/fixall-error.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite/fixall-error.test.ts rename to packages/vscode/e2e/lint/suite/fixall-error.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite/fixall-helpers.ts b/packages/vscode/e2e/lint/suite/fixall-helpers.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite/fixall-helpers.ts rename to packages/vscode/e2e/lint/suite/fixall-helpers.ts diff --git a/packages/vscode/tests/e2e/lint/suite/fixall-onsave.test.ts b/packages/vscode/e2e/lint/suite/fixall-onsave.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite/fixall-onsave.test.ts rename to packages/vscode/e2e/lint/suite/fixall-onsave.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite/fixall.test.ts b/packages/vscode/e2e/lint/suite/fixall.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite/fixall.test.ts rename to packages/vscode/e2e/lint/suite/fixall.test.ts diff --git a/packages/vscode/tests/e2e/lint/suite/index.ts b/packages/vscode/e2e/lint/suite/index.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite/index.ts rename to packages/vscode/e2e/lint/suite/index.ts diff --git a/packages/vscode/tests/e2e/lint/suite/registry-harness.test.ts b/packages/vscode/e2e/lint/suite/registry-harness.test.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/suite/registry-harness.test.ts rename to packages/vscode/e2e/lint/suite/registry-harness.test.ts diff --git a/packages/vscode/tests/e2e/lint/utils/codeActionRegistry.ts b/packages/vscode/e2e/lint/utils/codeActionRegistry.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/utils/codeActionRegistry.ts rename to packages/vscode/e2e/lint/utils/codeActionRegistry.ts diff --git a/packages/vscode/tests/e2e/lint/utils/configuration.ts b/packages/vscode/e2e/lint/utils/configuration.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/utils/configuration.ts rename to packages/vscode/e2e/lint/utils/configuration.ts diff --git a/packages/vscode/tests/e2e/lint/utils/deadline.ts b/packages/vscode/e2e/lint/utils/deadline.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/utils/deadline.ts rename to packages/vscode/e2e/lint/utils/deadline.ts diff --git a/packages/vscode/tests/e2e/lint/utils/diagnostics.ts b/packages/vscode/e2e/lint/utils/diagnostics.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/utils/diagnostics.ts rename to packages/vscode/e2e/lint/utils/diagnostics.ts diff --git a/packages/vscode/tests/e2e/lint/utils/documents.ts b/packages/vscode/e2e/lint/utils/documents.ts similarity index 100% rename from packages/vscode/tests/e2e/lint/utils/documents.ts rename to packages/vscode/e2e/lint/utils/documents.ts diff --git a/packages/vscode/tests/e2e/lint/utils/extension.ts b/packages/vscode/e2e/lint/utils/extension.ts similarity index 96% rename from packages/vscode/tests/e2e/lint/utils/extension.ts rename to packages/vscode/e2e/lint/utils/extension.ts index a70b8cb..46aa252 100644 --- a/packages/vscode/tests/e2e/lint/utils/extension.ts +++ b/packages/vscode/e2e/lint/utils/extension.ts @@ -7,7 +7,7 @@ * `getStackExports('rslint')` / `whenStackActive('rslint')` instead. */ import * as vscode from 'vscode'; -import type { RstackExtensionExports } from '../../../../src/types'; +import type { RstackExtensionExports } from '../../../src/types'; export const EXTENSION_ID = 'rstack.rstack'; diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/config/trailing-slash.config.ts b/packages/vscode/e2e/rstest/fixtures/workspace-1/config/trailing-slash.config.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/config/trailing-slash.config.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-1/config/trailing-slash.config.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/package.json b/packages/vscode/e2e/rstest/fixtures/workspace-1/package.json similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/package.json rename to packages/vscode/e2e/rstest/fixtures/workspace-1/package.json diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/rstest.config.ts b/packages/vscode/e2e/rstest/fixtures/workspace-1/rstest.config.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/rstest.config.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-1/rstest.config.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/src/foo.ts b/packages/vscode/e2e/rstest/fixtures/workspace-1/src/foo.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/src/foo.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-1/src/foo.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/src/index.ts b/packages/vscode/e2e/rstest/fixtures/workspace-1/src/index.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/src/index.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-1/src/index.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/each.test.ts b/packages/vscode/e2e/rstest/fixtures/workspace-1/test/each.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/each.test.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-1/test/each.test.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/foo.test.ts b/packages/vscode/e2e/rstest/fixtures/workspace-1/test/foo.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/foo.test.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-1/test/foo.test.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/index.test.ts b/packages/vscode/e2e/rstest/fixtures/workspace-1/test/index.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/index.test.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-1/test/index.test.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/jsFile.spec.js b/packages/vscode/e2e/rstest/fixtures/workspace-1/test/jsFile.spec.js similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/jsFile.spec.js rename to packages/vscode/e2e/rstest/fixtures/workspace-1/test/jsFile.spec.js diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/jsFile.spec.js.txt b/packages/vscode/e2e/rstest/fixtures/workspace-1/test/jsFile.spec.js.txt similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/jsFile.spec.js.txt rename to packages/vscode/e2e/rstest/fixtures/workspace-1/test/jsFile.spec.js.txt diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/jsxFile.test.jsx b/packages/vscode/e2e/rstest/fixtures/workspace-1/test/jsxFile.test.jsx similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/jsxFile.test.jsx rename to packages/vscode/e2e/rstest/fixtures/workspace-1/test/jsxFile.test.jsx diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/progress.test.ts b/packages/vscode/e2e/rstest/fixtures/workspace-1/test/progress.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/progress.test.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-1/test/progress.test.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/tsxFile.test.tsx b/packages/vscode/e2e/rstest/fixtures/workspace-1/test/tsxFile.test.tsx similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/test/tsxFile.test.tsx rename to packages/vscode/e2e/rstest/fixtures/workspace-1/test/tsxFile.test.tsx diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-1/tsconfig.json b/packages/vscode/e2e/rstest/fixtures/workspace-1/tsconfig.json similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-1/tsconfig.json rename to packages/vscode/e2e/rstest/fixtures/workspace-1/tsconfig.json diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-2/folder/project-2/rstest.config.ts b/packages/vscode/e2e/rstest/fixtures/workspace-2/folder/project-2/rstest.config.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-2/folder/project-2/rstest.config.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-2/folder/project-2/rstest.config.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-2/folder/project-2/test/foo.test.ts b/packages/vscode/e2e/rstest/fixtures/workspace-2/folder/project-2/test/foo.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-2/folder/project-2/test/foo.test.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-2/folder/project-2/test/foo.test.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-2/package.json b/packages/vscode/e2e/rstest/fixtures/workspace-2/package.json similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-2/package.json rename to packages/vscode/e2e/rstest/fixtures/workspace-2/package.json diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-2/project-1/rstest.config.ts b/packages/vscode/e2e/rstest/fixtures/workspace-2/project-1/rstest.config.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-2/project-1/rstest.config.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-2/project-1/rstest.config.ts diff --git a/packages/vscode/tests/e2e/rstest/fixtures/workspace-2/project-1/test/foo.test.ts b/packages/vscode/e2e/rstest/fixtures/workspace-2/project-1/test/foo.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/fixtures/workspace-2/project-1/test/foo.test.ts rename to packages/vscode/e2e/rstest/fixtures/workspace-2/project-1/test/foo.test.ts diff --git a/packages/vscode/tests/e2e/rstest/runTest.ts b/packages/vscode/e2e/rstest/runTest.ts similarity index 95% rename from packages/vscode/tests/e2e/rstest/runTest.ts rename to packages/vscode/e2e/rstest/runTest.ts index d2e92f3..aa7ff9b 100644 --- a/packages/vscode/tests/e2e/rstest/runTest.ts +++ b/packages/vscode/e2e/rstest/runTest.ts @@ -1,7 +1,7 @@ /** * The `@vscode/test-electron` entry point for the ported Rstest suites * (upstream `rstest/packages/vscode/tests/runTest.ts`, restated on this repo's - * harness patterns — see `tests/e2e/runTest.ts`). + * harness patterns — see `e2e/runTest.ts`). * * Unlike the shell/detection harness this one does **not** open a checked-in * workspace file: `suite/workspace.test.ts` calls `updateWorkspaceFolders` to @@ -19,12 +19,12 @@ import { runTests } from '@vscode/test-electron'; const FIXTURE_DIRS = ['workspace-1', 'workspace-2'] as const; async function main() { - // `__dirname` is `/tests-dist/tests/e2e/rstest` (see tsconfig.e2e.json). - const extensionDevelopmentPath = path.resolve(__dirname, '../../../..'); + // `__dirname` is `/tests-dist/e2e/rstest` (see tsconfig.e2e.json). + const extensionDevelopmentPath = path.resolve(__dirname, '../../..'); const extensionTestsPath = path.resolve(__dirname, './suite/index'); const fixturesRoot = path.join( extensionDevelopmentPath, - 'tests/e2e/rstest/fixtures', + 'e2e/rstest/fixtures', ); // The extension host loads `main` from `package.json`; an unbuilt repo would diff --git a/packages/vscode/tests/e2e/rstest/suite/helpers.ts b/packages/vscode/e2e/rstest/suite/helpers.ts similarity index 95% rename from packages/vscode/tests/e2e/rstest/suite/helpers.ts rename to packages/vscode/e2e/rstest/suite/helpers.ts index 491217b..f358c79 100644 --- a/packages/vscode/tests/e2e/rstest/suite/helpers.ts +++ b/packages/vscode/e2e/rstest/suite/helpers.ts @@ -5,7 +5,7 @@ import assert from 'node:assert'; import path from 'node:path'; import vscode from 'vscode'; -import type { RstackExtensionExports } from '../../../../src/types'; +import type { RstackExtensionExports } from '../../../src/types'; /** * The stack exports the suites consume — the shape @@ -22,11 +22,11 @@ export interface RstestExports { ) => Promise; } -/** `/tests/e2e/rstest/fixtures` (— `__dirname` is under `tests-dist/`). */ +/** `/e2e/rstest/fixtures` (— `__dirname` is under `tests-dist/`). */ export const FIXTURES_ROOT = path.resolve( __dirname, - '../../../../..', - 'tests/e2e/rstest/fixtures', + '../../../..', + 'e2e/rstest/fixtures', ); const EXTENSION_ID = 'rstack.rstack'; diff --git a/packages/vscode/tests/e2e/rstest/suite/index.test.ts b/packages/vscode/e2e/rstest/suite/index.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/suite/index.test.ts rename to packages/vscode/e2e/rstest/suite/index.test.ts diff --git a/packages/vscode/tests/e2e/rstest/suite/index.ts b/packages/vscode/e2e/rstest/suite/index.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/suite/index.ts rename to packages/vscode/e2e/rstest/suite/index.ts diff --git a/packages/vscode/tests/e2e/rstest/suite/progress.test.ts b/packages/vscode/e2e/rstest/suite/progress.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/suite/progress.test.ts rename to packages/vscode/e2e/rstest/suite/progress.test.ts diff --git a/packages/vscode/tests/e2e/rstest/suite/runtimeList.test.ts b/packages/vscode/e2e/rstest/suite/runtimeList.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/suite/runtimeList.test.ts rename to packages/vscode/e2e/rstest/suite/runtimeList.test.ts diff --git a/packages/vscode/tests/e2e/rstest/suite/uxCommands.test.ts b/packages/vscode/e2e/rstest/suite/uxCommands.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/suite/uxCommands.test.ts rename to packages/vscode/e2e/rstest/suite/uxCommands.test.ts diff --git a/packages/vscode/tests/e2e/rstest/suite/workspace.test.ts b/packages/vscode/e2e/rstest/suite/workspace.test.ts similarity index 100% rename from packages/vscode/tests/e2e/rstest/suite/workspace.test.ts rename to packages/vscode/e2e/rstest/suite/workspace.test.ts diff --git a/packages/vscode/tests/e2e/runTest.ts b/packages/vscode/e2e/runTest.ts similarity index 95% rename from packages/vscode/tests/e2e/runTest.ts rename to packages/vscode/e2e/runTest.ts index 9e16ef9..8c473c7 100644 --- a/packages/vscode/tests/e2e/runTest.ts +++ b/packages/vscode/e2e/runTest.ts @@ -14,10 +14,10 @@ import { runTests } from '@vscode/test-electron'; const FIXTURE_NAMES = ['rslint', 'rstest', 'rstack'] as const; async function main() { - // `__dirname` is `/tests-dist/tests/e2e` (see tsconfig.e2e.json). - const extensionDevelopmentPath = path.resolve(__dirname, '../../..'); + // `__dirname` is `/tests-dist/e2e` (see tsconfig.e2e.json). + const extensionDevelopmentPath = path.resolve(__dirname, '../..'); const extensionTestsPath = path.resolve(__dirname, './suite/index'); - const fixturesDir = path.join(extensionDevelopmentPath, 'tests/e2e/fixtures'); + const fixturesDir = path.join(extensionDevelopmentPath, 'e2e/fixtures'); const workspaceFile = path.join(fixturesDir, 'e2e.code-workspace'); // The extension host loads `main` from `package.json`; an unbuilt repo would diff --git a/packages/vscode/tests/e2e/setupFixtures.mjs b/packages/vscode/e2e/setupFixtures.mjs similarity index 96% rename from packages/vscode/tests/e2e/setupFixtures.mjs rename to packages/vscode/e2e/setupFixtures.mjs index 22acd76..3639ed3 100644 --- a/packages/vscode/tests/e2e/setupFixtures.mjs +++ b/packages/vscode/e2e/setupFixtures.mjs @@ -17,10 +17,10 @@ const here = path.dirname(fileURLToPath(import.meta.url)); export const FIXTURES_DIR = path.join(here, 'fixtures'); /** * Fixture name -> project directory. The `rstest-workspace-*` entries are the - * projects the ported Rstest suites (`tests/e2e/rstest/`) run against; + * projects the ported Rstest suites (`e2e/rstest/`) run against; * workspace-2 is one install at its root serving both nested projects. The * `lint` entry is the shared install root serving every ported Rslint suite - * workspace (`tests/e2e/lint/fixtures/*` — the workspaces themselves have no + * workspace (`e2e/lint/fixtures/*` — the workspaces themselves have no * package.json; @rslint/core resolves via Node's walk-up from one install). */ export const FIXTURES = { diff --git a/packages/vscode/tests/e2e/smoke/rslintPluginHost.mjs b/packages/vscode/e2e/smoke/rslintPluginHost.mjs similarity index 100% rename from packages/vscode/tests/e2e/smoke/rslintPluginHost.mjs rename to packages/vscode/e2e/smoke/rslintPluginHost.mjs diff --git a/packages/vscode/tests/e2e/suite/detection.test.ts b/packages/vscode/e2e/suite/detection.test.ts similarity index 97% rename from packages/vscode/tests/e2e/suite/detection.test.ts rename to packages/vscode/e2e/suite/detection.test.ts index 4c47900..ca20cd8 100644 --- a/packages/vscode/tests/e2e/suite/detection.test.ts +++ b/packages/vscode/e2e/suite/detection.test.ts @@ -1,8 +1,8 @@ import assert from 'node:assert/strict'; import path from 'node:path'; import * as vscode from 'vscode'; -import { detectFolder } from '../../../src/detection'; -import type { StackId } from '../../../src/types'; +import { detectFolder } from '../../src/detection'; +import type { StackId } from '../../src/types'; import { eventually } from './helpers'; /** diff --git a/packages/vscode/tests/e2e/suite/fmt.test.ts b/packages/vscode/e2e/suite/fmt.test.ts similarity index 98% rename from packages/vscode/tests/e2e/suite/fmt.test.ts rename to packages/vscode/e2e/suite/fmt.test.ts index c162b60..6f5d2d7 100644 --- a/packages/vscode/tests/e2e/suite/fmt.test.ts +++ b/packages/vscode/e2e/suite/fmt.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; import * as vscode from 'vscode'; -import type { RstackExtensionExports } from '../../../src/types'; +import type { RstackExtensionExports } from '../../src/types'; import { eventually } from './helpers'; const EXTENSION_ID = 'rstack.rstack'; diff --git a/packages/vscode/tests/e2e/suite/helpers.ts b/packages/vscode/e2e/suite/helpers.ts similarity index 100% rename from packages/vscode/tests/e2e/suite/helpers.ts rename to packages/vscode/e2e/suite/helpers.ts diff --git a/packages/vscode/tests/e2e/suite/index.ts b/packages/vscode/e2e/suite/index.ts similarity index 100% rename from packages/vscode/tests/e2e/suite/index.ts rename to packages/vscode/e2e/suite/index.ts diff --git a/packages/vscode/tests/e2e/suite/shell.test.ts b/packages/vscode/e2e/suite/shell.test.ts similarity index 98% rename from packages/vscode/tests/e2e/suite/shell.test.ts rename to packages/vscode/e2e/suite/shell.test.ts index b7d64e7..a6307ab 100644 --- a/packages/vscode/tests/e2e/suite/shell.test.ts +++ b/packages/vscode/e2e/suite/shell.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; import * as vscode from 'vscode'; -import type { RstackExtensionExports } from '../../../src/types'; +import type { RstackExtensionExports } from '../../src/types'; import { eventually } from './helpers'; const EXTENSION_ID = 'rstack.rstack'; diff --git a/packages/vscode/package.json b/packages/vscode/package.json index 272c5fb..a501013 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -30,13 +30,13 @@ "package:targets": "node scripts/packageTargets.mjs", "test": "pnpm run test:unit && pnpm run test:e2e", "test:e2e": "pnpm run test:e2e:fixtures && pnpm run test:e2e:smoke && pnpm run test:e2e:vscode && pnpm run test:e2e:rstest:run && pnpm run test:e2e:lint:run", - "test:e2e:fixtures": "node ./tests/e2e/setupFixtures.mjs", + "test:e2e:fixtures": "node ./e2e/setupFixtures.mjs", "test:e2e:lint": "pnpm run test:e2e:fixtures lint && pnpm run test:e2e:lint:run", - "test:e2e:lint:run": "tsc -p tsconfig.e2e.json && node ./tests-dist/tests/e2e/lint/runTest.js", + "test:e2e:lint:run": "tsc -p tsconfig.e2e.json && node ./tests-dist/e2e/lint/runTest.js", "test:e2e:rstest": "pnpm run test:e2e:fixtures rstest-workspace-1 rstest-workspace-2 && pnpm run test:e2e:rstest:run", - "test:e2e:rstest:run": "tsc -p tsconfig.e2e.json && node ./tests-dist/tests/e2e/rstest/runTest.js", - "test:e2e:smoke": "node ./tests/e2e/smoke/rslintPluginHost.mjs", - "test:e2e:vscode": "tsc -p tsconfig.e2e.json && node ./tests-dist/tests/e2e/runTest.js", + "test:e2e:rstest:run": "tsc -p tsconfig.e2e.json && node ./tests-dist/e2e/rstest/runTest.js", + "test:e2e:smoke": "node ./e2e/smoke/rslintPluginHost.mjs", + "test:e2e:vscode": "tsc -p tsconfig.e2e.json && node ./tests-dist/e2e/runTest.js", "test:unit": "rstest", "watch": "rslib build --watch", "watch:local": "cross-env SOURCEMAP=true rslib build --watch" diff --git a/packages/vscode/rstest.config.mts b/packages/vscode/rstest.config.mts index 7ea13c6..4b56e94 100644 --- a/packages/vscode/rstest.config.mts +++ b/packages/vscode/rstest.config.mts @@ -1,9 +1,9 @@ import { defineConfig } from '@rstest/core'; export default defineConfig({ - include: ['tests/unit/**/*.test.ts', 'src/**/*.test.ts'], + include: ['tests/**/*.test.ts'], // The E2E suite runs in a VS Code extension host, not in Rstest. - exclude: ['**/tests/e2e/**'], + exclude: ['**/e2e/**'], globals: true, name: 'rstack-editor', output: { diff --git a/packages/vscode/src/stacks/test/index.ts b/packages/vscode/src/stacks/test/index.ts index 2692c66..b12005a 100644 --- a/packages/vscode/src/stacks/test/index.ts +++ b/packages/vscode/src/stacks/test/index.ts @@ -71,7 +71,7 @@ class Rstest implements vscode.Disposable { /** * What upstream's `activate()` effectively exported (the `Rstest` instance): - * the E2E suites (`tests/e2e/rstest/`) consume `testController`, `runProfile` + * the E2E suites (`e2e/rstest/`) consume `testController`, `runProfile` * and `startTestRun`. The shell republishes this object through the * extension's public exports (`RstackExtensionExports.whenStackActive`). * All three values are stable for the lifetime of one registration; a diff --git a/packages/vscode/src/detection.test.ts b/packages/vscode/tests/detection.test.ts similarity index 98% rename from packages/vscode/src/detection.test.ts rename to packages/vscode/tests/detection.test.ts index 8811706..27558be 100644 --- a/packages/vscode/src/detection.test.ts +++ b/packages/vscode/tests/detection.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it, rs } from '@rstest/core'; import type vscode from 'vscode'; -import type { DetectionSnapshot } from './types'; +import type { DetectionSnapshot } from '../src/types'; // `detection.ts` imports the `vscode` namespace for the watcher/`findFiles` // paths. `detectionWatchPatterns` is pure, but the module still has to load, so @@ -47,7 +47,7 @@ import { DETECTION_WATCH_NAMES, DetectionService, detectionWatchPatterns, -} from './detection'; +} from '../src/detection'; /** * VS Code's glob engine has no nested brace groups. `splitGlobAware` diff --git a/packages/vscode/src/extension.test.ts b/packages/vscode/tests/extension.test.ts similarity index 98% rename from packages/vscode/src/extension.test.ts rename to packages/vscode/tests/extension.test.ts index c18ba1f..35d682b 100644 --- a/packages/vscode/src/extension.test.ts +++ b/packages/vscode/tests/extension.test.ts @@ -189,7 +189,7 @@ rs.mock('vscode', () => { return { ...vscode, default: vscode }; }); -rs.mock('./detection', () => { +rs.mock('../src/detection', () => { const snapshot = () => ({ folders: [], isDetected: (stack: string) => harness.detected.has(stack), @@ -213,21 +213,21 @@ rs.mock('./detection', () => { return { DetectionService }; }); -rs.mock('./stacks/lint', () => ({ +rs.mock('../src/stacks/lint', () => ({ createRslintController: () => harness.controller('rslint'), })); -rs.mock('./stacks/test', () => ({ +rs.mock('../src/stacks/test', () => ({ createRstestController: () => harness.controller('rstest'), })); -rs.mock('./stacks/fmt', () => ({ +rs.mock('../src/stacks/fmt', () => ({ createFmtController: () => harness.controller('fmt'), })); -rs.mock('./migration', () => ({ +rs.mock('../src/migration', () => ({ maybePromptForMigration: async () => undefined, runSettingsMigration: async () => undefined, })); -import { activate, deactivate } from './extension'; +import { activate, deactivate } from '../src/extension'; const context = { subscriptions: [] } as unknown as vscode.ExtensionContext; diff --git a/packages/vscode/tests/unit/loadRstackConfig.test.ts b/packages/vscode/tests/loadRstackConfig.test.ts similarity index 96% rename from packages/vscode/tests/unit/loadRstackConfig.test.ts rename to packages/vscode/tests/loadRstackConfig.test.ts index 076bcfa..b6cd53a 100644 --- a/packages/vscode/tests/unit/loadRstackConfig.test.ts +++ b/packages/vscode/tests/loadRstackConfig.test.ts @@ -2,7 +2,7 @@ import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'; import { tmpdir } from 'node:os'; import path from 'node:path'; import { afterAll, beforeAll, describe, expect, it } from '@rstest/core'; -import { loadRstackConfig } from '../../src/shared/vendored/loadRstackConfig'; +import { loadRstackConfig } from '../src/shared/vendored/loadRstackConfig'; // A stand-in for the project's own `rstack` install. It talks to the session // storage exactly the way rstack's shipped `dist` chunk does — through diff --git a/packages/vscode/src/migration.test.ts b/packages/vscode/tests/migration.test.ts similarity index 99% rename from packages/vscode/src/migration.test.ts rename to packages/vscode/tests/migration.test.ts index 3fb9d91..85035b6 100644 --- a/packages/vscode/src/migration.test.ts +++ b/packages/vscode/tests/migration.test.ts @@ -18,7 +18,7 @@ import { type LegacyReading, layerLabel, planMigration, -} from './migration'; +} from '../src/migration'; const reading = (partial: Partial & { key: string }) => ({ diff --git a/packages/vscode/src/stacks/fmt/run.test.ts b/packages/vscode/tests/stacks/fmt/run.test.ts similarity index 98% rename from packages/vscode/src/stacks/fmt/run.test.ts rename to packages/vscode/tests/stacks/fmt/run.test.ts index 006612e..bef30fa 100644 --- a/packages/vscode/src/stacks/fmt/run.test.ts +++ b/packages/vscode/tests/stacks/fmt/run.test.ts @@ -2,7 +2,12 @@ import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; import { afterEach, beforeEach, describe, expect, it } from '@rstest/core'; -import { minimalEdit, pickConfigDir, runRsFmt, type RsFmtRun } from './run'; +import { + minimalEdit, + pickConfigDir, + runRsFmt, + type RsFmtRun, +} from '../../../src/stacks/fmt/run'; import { createStubRoot, type StubRoot } from './stubProcess'; describe('pickConfigDir', () => { diff --git a/packages/vscode/src/stacks/fmt/standby.test.ts b/packages/vscode/tests/stacks/fmt/standby.test.ts similarity index 99% rename from packages/vscode/src/stacks/fmt/standby.test.ts rename to packages/vscode/tests/stacks/fmt/standby.test.ts index fd2d40e..82eadeb 100644 --- a/packages/vscode/src/stacks/fmt/standby.test.ts +++ b/packages/vscode/tests/stacks/fmt/standby.test.ts @@ -1,6 +1,6 @@ import path from 'node:path'; import { afterEach, beforeEach, describe, expect, it } from '@rstest/core'; -import { FmtStandby, type StandbyKey } from './standby'; +import { FmtStandby, type StandbyKey } from '../../../src/stacks/fmt/standby'; import { createStubRoot, type StubRoot } from './stubProcess'; /** diff --git a/packages/vscode/src/stacks/fmt/stubProcess.ts b/packages/vscode/tests/stacks/fmt/stubProcess.ts similarity index 100% rename from packages/vscode/src/stacks/fmt/stubProcess.ts rename to packages/vscode/tests/stacks/fmt/stubProcess.ts diff --git a/packages/vscode/src/stacks/test/bridge.test.ts b/packages/vscode/tests/stacks/test/bridge.test.ts similarity index 94% rename from packages/vscode/src/stacks/test/bridge.test.ts rename to packages/vscode/tests/stacks/test/bridge.test.ts index 1144c51..eaddcef 100644 --- a/packages/vscode/src/stacks/test/bridge.test.ts +++ b/packages/vscode/tests/stacks/test/bridge.test.ts @@ -2,10 +2,10 @@ import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; import { afterEach, beforeEach, describe, expect, it } from '@rstest/core'; -import type { StackState, StatusReporter } from '../../types'; -import { resolveRstackShim } from './bridge'; -import { logger } from './logger'; -import { status } from './status'; +import type { StackState, StatusReporter } from '../../../src/types'; +import { resolveRstackShim } from '../../../src/stacks/test/bridge'; +import { logger } from '../../../src/stacks/test/logger'; +import { status } from '../../../src/stacks/test/status'; // Resolution is exercised for real (a temporary `node_modules/rstack` tree) // rather than by mocking `nodeRequire`: the whole point of the bridge is that diff --git a/packages/vscode/src/stacks/test/coreResolution.test.ts b/packages/vscode/tests/stacks/test/coreResolution.test.ts similarity index 97% rename from packages/vscode/src/stacks/test/coreResolution.test.ts rename to packages/vscode/tests/stacks/test/coreResolution.test.ts index 4c792b8..4bb9061 100644 --- a/packages/vscode/src/stacks/test/coreResolution.test.ts +++ b/packages/vscode/tests/stacks/test/coreResolution.test.ts @@ -6,7 +6,7 @@ import { formatConfiguredCoreNotFoundMessage, formatCoreNotFoundMessage, isModuleNotFoundError, -} from './coreResolution'; +} from '../../../src/stacks/test/coreResolution'; // Resolve for real rather than hand-building an error object: the predicate // reads a message Node owns, so a fake error would only assert itself. diff --git a/packages/vscode/src/stacks/test/diagnostics.test.ts b/packages/vscode/tests/stacks/test/diagnostics.test.ts similarity index 97% rename from packages/vscode/src/stacks/test/diagnostics.test.ts rename to packages/vscode/tests/stacks/test/diagnostics.test.ts index 834e0d5..e6e70ce 100644 --- a/packages/vscode/src/stacks/test/diagnostics.test.ts +++ b/packages/vscode/tests/stacks/test/diagnostics.test.ts @@ -28,7 +28,7 @@ rs.mock('vscode', () => { }; }); -import { RstestDiagnostics } from './diagnostics'; +import { RstestDiagnostics } from '../../../src/stacks/test/diagnostics'; const createUri = (path: string) => ({ diff --git a/packages/vscode/src/stacks/test/errorStore.test.ts b/packages/vscode/tests/stacks/test/errorStore.test.ts similarity index 92% rename from packages/vscode/src/stacks/test/errorStore.test.ts rename to packages/vscode/tests/stacks/test/errorStore.test.ts index 50a7781..46f5ae3 100644 --- a/packages/vscode/src/stacks/test/errorStore.test.ts +++ b/packages/vscode/tests/stacks/test/errorStore.test.ts @@ -1,5 +1,8 @@ import { describe, expect, it } from '@rstest/core'; -import { TestErrorStore, testMessageText } from './errorStore'; +import { + TestErrorStore, + testMessageText, +} from '../../../src/stacks/test/errorStore'; const item = (id: string) => ({ id }) as any; const msg = (message: unknown) => ({ message }) as any; diff --git a/packages/vscode/src/stacks/test/master.test.ts b/packages/vscode/tests/stacks/test/master.test.ts similarity index 97% rename from packages/vscode/src/stacks/test/master.test.ts rename to packages/vscode/tests/stacks/test/master.test.ts index 63aa6e9..6c9fcd7 100644 --- a/packages/vscode/src/stacks/test/master.test.ts +++ b/packages/vscode/tests/stacks/test/master.test.ts @@ -3,8 +3,8 @@ import { createRequire } from 'node:module'; import os from 'node:os'; import path from 'node:path'; import { afterEach, beforeEach, describe, expect, it, rs } from '@rstest/core'; -import { logger } from './logger'; -import { RstestApi } from './master'; +import { logger } from '../../../src/stacks/test/logger'; +import { RstestApi } from '../../../src/stacks/test/master'; // The Rstest runner injects its own `@rstest/core` into every resolution path so // that test files can import it, which makes "the project has no @rstest/core" @@ -12,7 +12,7 @@ import { RstestApi } from './master'; // of `@rstest/core` that has no package directory above the search path fails // the way Node would, and every other lookup — including the *installed but // unusable* fixture below — goes to the real resolver untouched. -rs.mock('./nodeRequire', () => { +rs.mock('../../../src/stacks/test/nodeRequire', () => { const realRequire = createRequire(__filename); const hasInstalledCore = (from: string): boolean => { diff --git a/packages/vscode/src/stacks/test/parse.fixture.txt b/packages/vscode/tests/stacks/test/parse.fixture.txt similarity index 100% rename from packages/vscode/src/stacks/test/parse.fixture.txt rename to packages/vscode/tests/stacks/test/parse.fixture.txt diff --git a/packages/vscode/src/stacks/test/parse.test.ts b/packages/vscode/tests/stacks/test/parse.test.ts similarity index 99% rename from packages/vscode/src/stacks/test/parse.test.ts rename to packages/vscode/tests/stacks/test/parse.test.ts index 6c7b9cc..c346516 100644 --- a/packages/vscode/src/stacks/test/parse.test.ts +++ b/packages/vscode/tests/stacks/test/parse.test.ts @@ -1,7 +1,7 @@ import fs from 'node:fs'; import { join } from 'node:path'; import { describe, expect, it } from '@rstest/core'; -import { parseTestFile, type Range } from './parserTest'; +import { parseTestFile, type Range } from '../../../src/stacks/test/parserTest'; describe('parseTestFile', () => { it('should detect nested describe and test blocks', () => { diff --git a/packages/vscode/src/stacks/test/project.test.ts b/packages/vscode/tests/stacks/test/project.test.ts similarity index 97% rename from packages/vscode/src/stacks/test/project.test.ts rename to packages/vscode/tests/stacks/test/project.test.ts index ca5913b..d2897f1 100644 --- a/packages/vscode/src/stacks/test/project.test.ts +++ b/packages/vscode/tests/stacks/test/project.test.ts @@ -10,7 +10,7 @@ import { describe, expect, it, rs } from '@rstest/core'; const apiCalls: { cwd: string; configFilePath: string }[] = []; -rs.mock('./master', () => { +rs.mock('../../../src/stacks/test/master', () => { class RstestApi { constructor( _workspace: unknown, @@ -108,7 +108,7 @@ const collection = { const createProject = async (source: any) => { apiCalls.length = 0; - const { Project } = await import('./project'); + const { Project } = await import('../../../src/stacks/test/project'); const project = new Project(workspaceFolder, source, controller, collection); return { project, api: apiCalls[0]! }; }; diff --git a/packages/vscode/src/stacks/test/projectCoverage.test.ts b/packages/vscode/tests/stacks/test/projectCoverage.test.ts similarity index 98% rename from packages/vscode/src/stacks/test/projectCoverage.test.ts rename to packages/vscode/tests/stacks/test/projectCoverage.test.ts index 99b430e..6504a51 100644 --- a/packages/vscode/src/stacks/test/projectCoverage.test.ts +++ b/packages/vscode/tests/stacks/test/projectCoverage.test.ts @@ -1,5 +1,8 @@ import { describe, expect, it } from '@rstest/core'; -import { type ChildProjectRef, computeCoveredConfigs } from './projectCoverage'; +import { + type ChildProjectRef, + computeCoveredConfigs, +} from '../../../src/stacks/test/projectCoverage'; // Paths are absolute in practice; use POSIX-looking paths for readability. // `include` defaults to a shared pattern so identity/footprint coverage is diff --git a/packages/vscode/src/stacks/test/status.test.ts b/packages/vscode/tests/stacks/test/status.test.ts similarity index 96% rename from packages/vscode/src/stacks/test/status.test.ts rename to packages/vscode/tests/stacks/test/status.test.ts index f2ccecf..c3a96cb 100644 --- a/packages/vscode/src/stacks/test/status.test.ts +++ b/packages/vscode/tests/stacks/test/status.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from '@rstest/core'; -import type { StatusReporter } from '../../types'; -import { status } from './status'; +import type { StatusReporter } from '../../../src/types'; +import { status } from '../../../src/stacks/test/status'; // `status` is a module singleton; `bind()` resets the latches, so each test // binds its own recorder and starts from a clean slate. diff --git a/packages/vscode/src/stacks/test/terminal.test.ts b/packages/vscode/tests/stacks/test/terminal.test.ts similarity index 94% rename from packages/vscode/src/stacks/test/terminal.test.ts rename to packages/vscode/tests/stacks/test/terminal.test.ts index 7ac8fa8..57bd1c8 100644 --- a/packages/vscode/src/stacks/test/terminal.test.ts +++ b/packages/vscode/tests/stacks/test/terminal.test.ts @@ -4,7 +4,7 @@ import { describe, expect, it, rs } from '@rstest/core'; // to load the module and exercise the pure `shellQuote`. rs.mock('vscode', () => ({ default: {} })); -import { shellQuote } from './terminal'; +import { shellQuote } from '../../../src/stacks/test/terminal'; describe('shellQuote', () => { it('leaves safe tokens unquoted', () => { diff --git a/packages/vscode/src/stacks/test/testTree.test.ts b/packages/vscode/tests/stacks/test/testTree.test.ts similarity index 95% rename from packages/vscode/src/stacks/test/testTree.test.ts rename to packages/vscode/tests/stacks/test/testTree.test.ts index 48816b3..8e2c350 100644 --- a/packages/vscode/src/stacks/test/testTree.test.ts +++ b/packages/vscode/tests/stacks/test/testTree.test.ts @@ -87,7 +87,7 @@ const withoutLocations = [ describe('TestFile.updateFromList', () => { it('keeps existing ranges when a rebuilt test reports no location', async () => { - const { TestFile } = await import('./testTree'); + const { TestFile } = await import('../../../src/stacks/test/testTree'); const controller = createController(); const uri = { fsPath: '/x/outer.test.ts', toString: () => 'file:///x' }; const file = new TestFile({} as any, uri as any, controller); @@ -111,7 +111,7 @@ describe('TestFile.updateFromList', () => { }); it('uses the reported location when one is present', async () => { - const { TestFile } = await import('./testTree'); + const { TestFile } = await import('../../../src/stacks/test/testTree'); const controller = createController(); const uri = { fsPath: '/x/outer.test.ts', toString: () => 'file:///x' }; const file = new TestFile({} as any, uri as any, controller); @@ -134,7 +134,8 @@ describe('TestFile.updateFromList', () => { }); it('preserves separate ranges for duplicate sibling names', async () => { - const { TestFile, getTestItemId } = await import('./testTree'); + const { TestFile, getTestItemId } = + await import('../../../src/stacks/test/testTree'); const controller = createController(); const uri = { fsPath: '/x/dup.test.ts', toString: () => 'file:///x' }; const file = new TestFile({} as any, uri as any, controller); diff --git a/packages/vscode/src/stacks/test/utils.test.ts b/packages/vscode/tests/stacks/test/utils.test.ts similarity index 90% rename from packages/vscode/src/stacks/test/utils.test.ts rename to packages/vscode/tests/stacks/test/utils.test.ts index 7b3c007..8dedd5c 100644 --- a/packages/vscode/src/stacks/test/utils.test.ts +++ b/packages/vscode/tests/stacks/test/utils.test.ts @@ -1,5 +1,5 @@ import { expect, it, rs } from '@rstest/core'; -import { isTestFile } from './utils'; +import { isTestFile } from '../../../src/stacks/test/utils'; rs.mock('vscode', () => { return {}; diff --git a/packages/vscode/tests/unit/versionCheck.test.ts b/packages/vscode/tests/versionCheck.test.ts similarity index 97% rename from packages/vscode/tests/unit/versionCheck.test.ts rename to packages/vscode/tests/versionCheck.test.ts index 3d3e518..9b8ebb7 100644 --- a/packages/vscode/tests/unit/versionCheck.test.ts +++ b/packages/vscode/tests/versionCheck.test.ts @@ -4,7 +4,7 @@ import { formatVersionMismatch, isSupportedConfigDiscoveryProtocolVersion, SUPPORT_MATRIX, -} from '../../src/shared/versionCheck'; +} from '../src/shared/versionCheck'; describe('support matrix', () => { it('pins the launch support floors', () => { diff --git a/packages/vscode/tsconfig.e2e.json b/packages/vscode/tsconfig.e2e.json index deffa62..af5e8d1 100644 --- a/packages/vscode/tsconfig.e2e.json +++ b/packages/vscode/tsconfig.e2e.json @@ -2,11 +2,12 @@ // The E2E harness runs inside the VS Code extension host as plain CommonJS, // so it is compiled with tsc (not rslib) into `tests-dist/`. // - // `rootDir` is the repo root because `tests/e2e/suite/detection.test.ts` - // imports the shell's own `detectFolder` and runs it against the real fixture - // workspaces — the extension host is the only place where `workspace.findFiles` - // is real. Only the two modules it needs are compiled; everything else the - // extension does comes from the bundle VS Code loads via `main`. + // `rootDir` is the package root because the suites reach outside `e2e/`: + // `e2e/suite/detection.test.ts` imports the shell's own `detectFolder` and + // runs it against the real fixture workspaces — the extension host is the + // only place where `workspace.findFiles` is real. tsc pulls those modules in + // from the suites that import them, so only what the suites actually reach is + // compiled; everything else comes from the bundle VS Code loads via `main`. "compilerOptions": { // `nodenext` (not plain commonjs/node10): the ported Rslint suites compile // `src/stacks/lint/*` into `tests-dist`, and those modules import @@ -27,19 +28,15 @@ "strict": true, "skipLibCheck": true }, - "include": [ - "tests/e2e/**/*.ts", - "src/shell/detection.ts", - "src/shell/types.ts" - ], + "include": ["e2e/**/*.ts"], // The fixtures are standalone projects with their own dependencies; they are // never compiled by this repo's tsc. "exclude": [ "node_modules", "dist", "tests-dist", - "tests/e2e/fixtures", - "tests/e2e/rstest/fixtures", - "tests/e2e/lint/fixtures" + "e2e/fixtures", + "e2e/rstest/fixtures", + "e2e/lint/fixtures" ] } diff --git a/packages/vscode/tsconfig.json b/packages/vscode/tsconfig.json index c7db706..eb2b7a6 100644 --- a/packages/vscode/tsconfig.json +++ b/packages/vscode/tsconfig.json @@ -18,15 +18,15 @@ "forceConsistentCasingInFileNames": true, "types": ["node"] }, - "include": ["src", "tests/unit", "tests/e2e"], + "include": ["src", "tests", "e2e"], // The E2E fixtures are standalone projects resolving their own published // dependencies — not part of this repo's compilation. "exclude": [ "node_modules", "dist", "tests-dist", - "tests/e2e/fixtures", - "tests/e2e/rstest/fixtures", - "tests/e2e/lint/fixtures" + "e2e/fixtures", + "e2e/rstest/fixtures", + "e2e/lint/fixtures" ] } diff --git a/rstack.config.ts b/rstack.config.ts index 7d124aa..cc56300 100644 --- a/rstack.config.ts +++ b/rstack.config.ts @@ -10,9 +10,9 @@ define.lint(async () => { '**/tests-dist/**', '**/.vscode-test/**', // Fixture projects are user-land sample code, not extension source. - 'packages/vscode/tests/e2e/fixtures/**', - 'packages/vscode/tests/e2e/rstest/fixtures/**', - 'packages/vscode/tests/e2e/lint/fixtures/**', + 'packages/vscode/e2e/fixtures/**', + 'packages/vscode/e2e/rstest/fixtures/**', + 'packages/vscode/e2e/lint/fixtures/**', ], }, ts.configs.recommended, @@ -42,9 +42,9 @@ define.fmt({ ignorePatterns: [ // E2E fixture sources are asserted on byte-for-byte (diagnostic ranges, // autofix results, AST-collected line numbers) — formatting breaks them. - 'packages/vscode/tests/e2e/fixtures/**', - 'packages/vscode/tests/e2e/rstest/fixtures/**', - 'packages/vscode/tests/e2e/lint/fixtures/**', + 'packages/vscode/e2e/fixtures/**', + 'packages/vscode/e2e/rstest/fixtures/**', + 'packages/vscode/e2e/lint/fixtures/**', // Vendored agent skills mirror mattpocock/skills byte-for-byte; // skills-lock.json hashes them, so formatting causes update churn. '.agents/**',