@checkstack/frontend 0.6.5 → 0.6.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # @checkstack/frontend
2
2
 
3
+ ## 0.6.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b995afb]
8
+ - Updated dependencies [270ef29]
9
+ - Updated dependencies [b995afb]
10
+ - Updated dependencies [b995afb]
11
+ - Updated dependencies [b995afb]
12
+ - Updated dependencies [b995afb]
13
+ - Updated dependencies [270ef29]
14
+ - Updated dependencies [b995afb]
15
+ - Updated dependencies [b995afb]
16
+ - Updated dependencies [b995afb]
17
+ - Updated dependencies [270ef29]
18
+ - Updated dependencies [b995afb]
19
+ - Updated dependencies [270ef29]
20
+ - Updated dependencies [b995afb]
21
+ - @checkstack/ui@1.12.0
22
+ - @checkstack/auth-frontend@0.6.7
23
+ - @checkstack/about-frontend@0.2.23
24
+ - @checkstack/announcement-frontend@0.3.7
25
+ - @checkstack/catalog-frontend@0.10.7
26
+ - @checkstack/command-frontend@0.2.42
27
+ - @checkstack/dependency-frontend@0.4.8
28
+
29
+ ## 0.6.6
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [e2d6f25]
34
+ - Updated dependencies [41c77f4]
35
+ - Updated dependencies [41c77f4]
36
+ - Updated dependencies [41c77f4]
37
+ - Updated dependencies [41c77f4]
38
+ - Updated dependencies [4832e33]
39
+ - Updated dependencies [6d52276]
40
+ - Updated dependencies [35bc682]
41
+ - Updated dependencies [c39ee69]
42
+ - @checkstack/frontend-api@0.6.0
43
+ - @checkstack/ui@1.11.0
44
+ - @checkstack/common@0.12.0
45
+ - @checkstack/about-frontend@0.2.22
46
+ - @checkstack/announcement-frontend@0.3.6
47
+ - @checkstack/auth-frontend@0.6.6
48
+ - @checkstack/catalog-frontend@0.10.6
49
+ - @checkstack/command-frontend@0.2.41
50
+ - @checkstack/dependency-frontend@0.4.7
51
+ - @checkstack/signal-common@0.2.5
52
+ - @checkstack/signal-frontend@0.1.5
53
+
3
54
  ## 0.6.5
4
55
 
5
56
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/frontend",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "license": "Elastic-2.0",
5
5
  "checkstack": {
6
6
  "type": "frontend"
@@ -16,17 +16,17 @@
16
16
  "lint:code": "eslint . --max-warnings 0"
17
17
  },
18
18
  "dependencies": {
19
- "@checkstack/about-frontend": "0.2.21",
20
- "@checkstack/announcement-frontend": "0.3.5",
21
- "@checkstack/auth-frontend": "0.6.5",
22
- "@checkstack/catalog-frontend": "0.10.5",
23
- "@checkstack/command-frontend": "0.2.40",
24
- "@checkstack/common": "0.11.0",
25
- "@checkstack/dependency-frontend": "0.4.5",
26
- "@checkstack/frontend-api": "0.5.2",
27
- "@checkstack/signal-common": "0.2.4",
28
- "@checkstack/signal-frontend": "0.1.4",
29
- "@checkstack/ui": "1.10.0",
19
+ "@checkstack/about-frontend": "0.2.22",
20
+ "@checkstack/announcement-frontend": "0.3.6",
21
+ "@checkstack/auth-frontend": "0.6.6",
22
+ "@checkstack/catalog-frontend": "0.10.6",
23
+ "@checkstack/command-frontend": "0.2.41",
24
+ "@checkstack/common": "0.12.0",
25
+ "@checkstack/dependency-frontend": "0.4.7",
26
+ "@checkstack/frontend-api": "0.6.0",
27
+ "@checkstack/signal-common": "0.2.5",
28
+ "@checkstack/signal-frontend": "0.1.5",
29
+ "@checkstack/ui": "1.11.0",
30
30
  "@orpc/client": "^1.13.14",
31
31
  "@tanstack/react-query": "^5.64.0",
32
32
  "@tanstack/react-query-devtools": "^5.64.0",
@@ -40,7 +40,7 @@
40
40
  "tailwind-merge": "^2.2.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@checkstack/scripts": "0.3.3",
43
+ "@checkstack/scripts": "0.3.4",
44
44
  "@checkstack/tsconfig": "0.0.7",
45
45
  "@types/react": "^18.2.64",
46
46
  "@types/react-dom": "^18.2.21",
package/vite.config.ts CHANGED
@@ -1,10 +1,34 @@
1
1
  import { defineConfig } from "vite";
2
2
  import react from "@vitejs/plugin-react";
3
3
  import path from "node:path";
4
+ import { createRequire } from "node:module";
4
5
 
5
6
  // Monorepo root is 2 levels up from core/frontend
6
7
  const monorepoRoot = path.resolve(__dirname, "../..");
7
8
 
9
+ // Resolve the `vscode` npm-alias (= @codingame/monaco-vscode-extension-api) to
10
+ // an absolute path so Vite can alias it. (Migration stage 1.)
11
+ //
12
+ // `@typefox/monaco-editor-react` and `monaco-languageclient` declare
13
+ // `"vscode": "npm:@codingame/monaco-vscode-extension-api"`. Under bun's
14
+ // isolated node_modules that alias is only materialized inside those two
15
+ // packages — but the package that actually does `require("vscode")` at runtime
16
+ // (@codingame/monaco-vscode-api) has no `vscode` in its own scope, so esbuild
17
+ // can't resolve it and leaks a runtime `require` into the browser ("Calling
18
+ // require for vscode in an environment that doesn't expose the require
19
+ // function"). Aliasing every `vscode` specifier to the real package dir fixes
20
+ // it. We resolve the alias *through* @typefox so the path follows bun's store
21
+ // layout on any machine/CI rather than being hardcoded.
22
+ const localRequire = createRequire(path.join(__dirname, "vite.config.ts"));
23
+ const typefoxDir = path.dirname(
24
+ localRequire.resolve("@typefox/monaco-editor-react", {
25
+ paths: [path.resolve(__dirname, "../ui")],
26
+ }),
27
+ );
28
+ const vscodeApiDir = path.dirname(
29
+ localRequire.resolve("vscode", { paths: [typefoxDir] }),
30
+ );
31
+
8
32
  // https://vitejs.dev/config/
9
33
  export default defineConfig(() => {
10
34
  // Backend URL for proxy - always targets local backend in dev
@@ -13,6 +37,11 @@ export default defineConfig(() => {
13
37
  // Tell Vite to look for .env files in monorepo root
14
38
  envDir: monorepoRoot,
15
39
  plugins: [react()],
40
+ // The @typefox/monaco-editor-react + @codingame/monaco-vscode-* stack
41
+ // loads its language services in ES module workers. (Migration stage 1.)
42
+ worker: {
43
+ format: "es",
44
+ },
16
45
  server: {
17
46
  proxy: {
18
47
  // Proxy API requests and WebSocket connections to backend
@@ -51,7 +80,20 @@ export default defineConfig(() => {
51
80
 
52
81
  // Pre-bundle React deps for faster dev server startup (dev mode only)
53
82
  optimizeDeps: {
54
- include: ["react", "react-dom", "react-router-dom"],
83
+ include: [
84
+ "react",
85
+ "react-dom",
86
+ "react-router-dom",
87
+ // NOTE (migration stage 1): the Monaco / VS Code editor stack
88
+ // (@typefox/monaco-editor-react, monaco-languageclient, @codingame/*)
89
+ // is intentionally NOT listed here. Those packages live in
90
+ // @checkstack/ui's node_modules under bun's isolated store and are not
91
+ // resolvable as bare specifiers from this app root, so listing them
92
+ // errors ("Failed to resolve dependency ... present in
93
+ // optimizeDeps.include"). Vite discovers and pre-bundles them through
94
+ // the import graph instead, and the `require("vscode")` CJS interop is
95
+ // handled by the `vscode` resolve.alias below.
96
+ ],
55
97
  },
56
98
  build: {
57
99
  // Use esnext to support top-level await and modern ES features
@@ -75,6 +117,10 @@ export default defineConfig(() => {
75
117
  ],
76
118
  alias: {
77
119
  "@": path.resolve(__dirname, "./src"),
120
+ // See vscodeApiDir above: alias the `vscode` npm-alias to its real
121
+ // package dir so @codingame's CJS `require("vscode")` resolves under
122
+ // bun's isolated store instead of leaking a runtime require.
123
+ vscode: vscodeApiDir,
78
124
  },
79
125
  },
80
126
  };