Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}
}
},
"main": "./dist/flying-sheep.hatch/extension.js",
"main": "./dist/extension.js",
"scripts": {
"postinstall": "concurrently -c auto -n husky,sync \"$npm_execpath postinstall:husky\" \"$npm_execpath sync\"",
"postinstall:husky": "husky",
Expand All @@ -60,7 +60,7 @@
"lint:deps": "knip --use-tsconfig-files",
"test": "$npm_execpath run build && vscode-test",
"vscode:prepublish": "$npm_execpath run sync && $npm_execpath run build",
"vsce-package": "vsce package --yarn --no-dependencies -o flying-sheep.hatch.vsix"
"vsce-package": "vsce package --yarn --no-dependencies"
},
"lint-staged": {
"*": "biome check --no-errors-on-unmatched --files-ignore-unknown=true --write"
Expand Down
3 changes: 1 addition & 2 deletions rolldown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import swc from '@rollup/plugin-swc'
import { defineConfig } from 'rolldown'
import { withFilter } from 'rolldown/filter'
import { esmExternalRequirePlugin } from 'rolldown/plugins'
import { EXTENSION_ID } from './src/common/constants.js'

export default defineConfig({
input: 'src/extension.ts',
external: ['vscode'],
output: {
file: `dist/${EXTENSION_ID}/extension.js`,
file: `dist/extension.js`,
sourcemap: true,
},
platform: 'node',
Expand Down
7 changes: 5 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { type ExtensionContext, window } from 'vscode'
import { HatchExecutableTracker } from './cli/index.js'
import { EXTENSION_ID } from './common/constants.js'
import { registerLogger } from './common/logging.js'
import { setWorkspacePersistentState } from './common/persistent-state.js'
import { HatchEnvManager } from './hatch-env-manager.js'
Expand All @@ -23,8 +24,10 @@ export async function activate(context: ExtensionContext): Promise<Api> {
const pkgManager = new HatchPackageManager(api, exe, log)
context.subscriptions.push(
exe,
api.registerEnvironmentManager(envManager),
api.registerPackageManager(pkgManager),
api.registerEnvironmentManager(envManager, {
extensionId: EXTENSION_ID,
}),
api.registerPackageManager(pkgManager, { extensionId: EXTENSION_ID }),
)

return {
Expand Down