@evandam93/dev-env 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -262,7 +262,7 @@ It reads each fact where it already lives, so nothing is kept by hand:
262
262
 
263
263
  - The processes a spec starts are the ones its single `startTestEnvironment` call does not leave out, so `without` must be a written-out list of names.
264
264
  - A process reaches the directories its `sources` name, and every file their code imports, following relative imports and the `paths` of the nearest `tsconfig.json`.
265
- - A spec reaches every file it imports, and a workspace package it imports, by the name its `package.json` gives it, as a whole.
265
+ - A spec reaches every file it imports, also one imported with a query such as Vite's `?raw`, and a workspace package it imports, by the name its `package.json` gives it, as a whole.
266
266
  - A shared path runs every spec.
267
267
  The target's are `dev-env.ts`, `compose.yaml`, `compose.test.yaml`, `package.json`, `tsconfig.json`, `tsconfig.*.json` and `vitest.integration.ts`.
268
268
  The repository's are its root `package.json`, `tsconfig.json`, `.nvmrc`, `.node-version`, and its package manager's lockfile and configuration, such as `pnpm-workspace.yaml` or `.yarnrc.yml`.
@@ -117,7 +117,9 @@ const importedFrom = (layout, starts) => {
117
117
  // A JSON or CSS file is reached, but imports nothing itself.
118
118
  if (!/\.[cm]?[jt]sx?$/.test(file))
119
119
  continue;
120
- for (const request of requestsOf(file)) {
120
+ for (const imported of requestsOf(file)) {
121
+ // Vite's queries, such as ?raw, ask for the same file in another form.
122
+ const request = imported.replace(/\?.*$/, '');
121
123
  const workspace = layout.packages.get(packageNameOf(request));
122
124
  if (workspace !== undefined)
123
125
  packages.add(workspace);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evandam93/dev-env",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "One development environment per checkout and target, from a manifest beside your code, so worktrees run side by side with no ports pinned anywhere.",
5
5
  "keywords": [
6
6
  "development-environment",