Skip to content

Commit bc36e0a

Browse files
authored
Merge pull request #15 from posit-dev/switch-to-upstream-0.37.5
Switch upstream from v0.38 to v0.37.5
2 parents c82187a + e0ff727 commit bc36e0a

File tree

170 files changed

+3002
-10924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+3002
-10924
lines changed

.claude/CLAUDE.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

.claude/CLAUDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Claude Instructions
2+
3+
## General Repository Instructions
4+
5+
For all repository instructions, coding standards, and development guidelines, **ALWAYS** read:
6+
7+
**[.github/copilot-instructions.md](../.github/copilot-instructions.md)**

.esbuild.ts

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,21 @@
66
import * as watcher from '@parcel/watcher';
77
import * as esbuild from 'esbuild';
88
import * as fs from 'fs';
9-
import { copyFile, mkdir, readdir, rename } from 'fs/promises';
9+
import { copyFile, mkdir } from 'fs/promises';
1010
import { glob } from 'glob';
1111
import * as path from 'path';
1212

1313
const REPO_ROOT = import.meta.dirname;
1414
const isWatch = process.argv.includes('--watch');
1515
const isDev = process.argv.includes('--dev');
1616
const isPreRelease = process.argv.includes('--prerelease');
17-
const generateSourceMaps = process.argv.includes('--sourcemaps');
18-
const sourceMapOutDir = './dist-sourcemaps';
1917

2018
const baseBuildOptions = {
2119
bundle: true,
2220
logLevel: 'info',
2321
minify: !isDev,
2422
outdir: './dist',
25-
// In dev mode, use linked source maps for debugging.
26-
// With --sourcemaps flag, generate external source maps (no sourceMappingURL comment in output).
27-
sourcemap: isDev ? 'linked' : (generateSourceMaps ? 'external' : false),
23+
sourcemap: isDev ? 'linked' : false,
2824
sourcesContent: false,
2925
treeShaking: true
3026
} satisfies esbuild.BuildOptions;
@@ -287,42 +283,6 @@ const typeScriptServerPluginBuildOptions = {
287283
]
288284
} satisfies esbuild.BuildOptions;
289285

290-
/**
291-
* Moves all .map files from the output directories to a separate source maps directory.
292-
* This keeps source maps out of the packaged extension while making them available for upload.
293-
*/
294-
async function moveSourceMapsToSeparateDir(): Promise<void> {
295-
if (!generateSourceMaps) {
296-
return;
297-
}
298-
299-
const outputDirs = [
300-
'./dist',
301-
'./node_modules/@vscode/copilot-typescript-server-plugin/dist',
302-
];
303-
304-
await mkdir(sourceMapOutDir, { recursive: true });
305-
306-
for (const dir of outputDirs) {
307-
try {
308-
const files = await readdir(dir);
309-
for (const file of files) {
310-
if (file.endsWith('.map')) {
311-
const sourcePath = path.join(dir, file);
312-
// Prefix with directory name to avoid collisions
313-
const prefix = dir === './dist' ? '' : 'ts-plugin-';
314-
const destPath = path.join(sourceMapOutDir, prefix + file);
315-
await rename(sourcePath, destPath);
316-
console.log(`Moved source map: ${sourcePath} -> ${destPath}`);
317-
}
318-
}
319-
} catch (error) {
320-
// Directory might not exist in some build configurations
321-
console.warn(`Could not process directory ${dir}:`, error);
322-
}
323-
}
324-
}
325-
326286
async function main() {
327287
if (!isDev) {
328288
applyPackageJsonPatch(isPreRelease);
@@ -408,9 +368,6 @@ async function main() {
408368
esbuild.build(typeScriptServerPluginBuildOptions),
409369
esbuild.build(webviewBuildOptions),
410370
]);
411-
412-
// Move source maps to separate directory so they're not packaged with the extension
413-
await moveSourceMapsToSeparateDir();
414371
}
415372
}
416373

.github/copilot-instructions.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,5 @@ The extension uses numerous proposed VS Code APIs for advanced functionality:
337337
This extension is a complex, multi-layered system that provides comprehensive AI assistance within VS Code. Understanding the service architecture, contribution system, and separation between platform and extension layers is crucial for making effective changes.
338338

339339
## Best Practices
340-
- Use services and dependency injection over VS Code extension APIs when possible:
341-
- Use `IFileSystemService` instead of Node's `fs` or `vscode.workspace.fs`
342-
- Use `ILogService` instead of `console.log`
343-
- Look for existing `I*Service` interfaces before reaching for raw APIs
344-
- **Why**: Enables unit testing without VS Code host, supports simulation tests, provides cross-platform abstractions (Node vs web), and adds features like caching and size limits
340+
- Use services and dependency injection whenever possible instead of using node or vscode APIs directly. For example, use `IFileSystemService` instead of node's `fs`.
345341
- Always use the URI type instead of using string file paths. There are many helpers available for working with URIs.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
.vscode-test-web/
44
node_modules/
55
dist/
6-
dist-sourcemaps/
76

87
# created by simulation
98
.simulation

build/pre-release.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,11 @@ parameters:
3535
displayName: 🚀 Publish Pre-Release
3636
type: boolean
3737
default: false
38-
- name: processLocalization
39-
displayName: 🌐 Process Localization
40-
type: boolean
41-
default: true
4238

4339
extends:
4440
template: azure-pipelines/extension/pre-release.yml@templates
4541
parameters:
4642
l10nSourcePaths: ./src
47-
l10nShouldProcess: ${{ parameters.processLocalization }}
4843
nodeVersion: 22.21.x
4944
standardizedVersioning: true
5045

@@ -131,9 +126,6 @@ extends:
131126
- script: npm run build -- --prerelease
132127
displayName: npm run build
133128

134-
uploadSourceMaps:
135-
enabled: true
136-
137129
# testPlatforms:
138130
# - name: Linux
139131
# nodeVersions: [16.x]

build/release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ extends:
117117
- script: npm run build
118118
displayName: npm run build
119119

120-
uploadSourceMaps:
121-
enabled: true
122-
123120
# testPlatforms:
124121
# - name: Linux
125122
# nodeVersions: [16.x]

chat-lib/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chat-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"dependencies": {
1717
"@microsoft/tiktokenizer": "^1.0.10",
1818
"@sinclair/typebox": "^0.34.41",
19-
"@vscode/copilot-api": "^0.2.12",
19+
"@vscode/copilot-api": "^0.2.8",
2020
"@vscode/l10n": "^0.0.18",
2121
"@vscode/prompt-tsx": "^0.4.0-alpha.6",
2222
"@vscode/tree-sitter-wasm": "0.0.5-php.2",

0 commit comments

Comments
 (0)