Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add package scripts and cli library, enable integration testing#536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jaggederest wants to merge13 commits intomain
base:main
Choose a base branch
Loading
fromjaggederest/integration_tests

Conversation

jaggederest
Copy link

@jaggederestjaggederest commentedJun 16, 2025
edited
Loading

A working vscode-test integration test that validates that the module will load and add commands, at least.

Copilot

This comment was marked as outdated.

jaggederestand others added5 commitsJune 16, 2025 14:31
- Add test mode detection to bypass Remote SSH extension requirement- Skip remoteAuthority access in test mode to avoid API proposal errors- Update test expectations to match actual extension behavior- Configure vscode-test to enable proposed API for tests- Add proper command registration verification with timing delayThe extension now gracefully handles test environments where the RemoteSSH extension is not available, allowing integration tests to pass.🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
- Add vitest.config.ts with proper include/exclude patterns- Exclude src/test/** directory from unit tests (VS Code integration tests)- Exclude compiled out/** directory from test discovery- Update tsconfig.json to exclude vitest.config.ts from compilation- Add .eslintignore to skip linting vitest config- Update test script to use default Vitest behavior- Fix .vscodeignore formatting (add missing newline)🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
@jaggederestjaggederest marked this pull request as ready for reviewJune 16, 2025 22:05
Copy link
Member

@code-ashercode-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Leaving off an approve until we sortprettyBytes but this is great!

jaggederest reacted with hooray emoji
jaggederestand others added2 commitsJune 17, 2025 12:37
…d ES6- Updated tsconfig.json to use CommonJS module system with proper ES module interop- Converted dynamic imports of pretty-bytes to standard ES6 imports in remote.ts and storage.ts- Added integration test command to CLAUDE.md documentation🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR adds package scripts and a CLI library while enabling integration testing for the extension.

  • Introduces vitest configuration and integration tests to validate extension activation and command registration.
  • Updates error handling in the extension activation flow and adjusts asynchronous handling in the remote module.
  • Enhances package.json scripts and CI/CD configurations for Node 22 support.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
vitest.config.tsAdds testing configuration for the vitest environment.
src/test/extension.test.tsImplements integration tests for verifying extension functionality.
src/remote.tsModifies async handling in the updateStatus function.
src/extension.tsAdjusts activation flow and Remote SSH error handling behavior.
package.jsonAdds new CLI/test scripts and updates dependency versions.
CLAUDE.mdDocuments the new integration test command.
.vscode-test.mjsIntroduces VS Code test configuration via the test-cli package.
.github/workflows/*.yamlUpdates Node version from 18 to 22 in CI and release workflows.
.eslintignoreExcludes vitest.config.ts from linting.
Comments suppressed due to low confidence (2)

src/extension.ts:34

  • The removal of a thrown error for a missing Remote SSH extension changes the activation behavior. Ensure this fallback is intentional and well-documented so that downstream logic is not unexpectedly executed without the necessary extension.
vscode.window.showErrorMessage(

.vscode-test.mjs:1

  • [nitpick] Consider adding a comment to explain the purpose of this VS Code test configuration to improve maintainability.
import { defineConfig } from "@vscode/test-cli";

Comment on lines +40 to 47
// eslint-disable-next-line @typescript-eslint/no-explicit-any
vscodeProposed = (module as any)._load(
"vscode",
{
filename: remoteSSHExtension.extensionPath,
},
false,
);
Copy link
Preview

CopilotAIJun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Using 'module as any' bypasses type safety; consider a more type-safe approach or adding documentation to justify this workaround.

Copilot uses AI. Check for mistakes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yeah I get it buddy I don't like it either but we're polymorphic on the SSH extensions.

code-asher reacted with laugh emoji
Comment on lines +291 to +292
// (this would require the user to uninstall the Coder extension and
// reinstall after installing the remote SSH extension, which is annoying)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

🎉

@@ -1,14 +1,17 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"target": "ES2022",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Do we know whether our minimum version of VS Code (1.73.0) supported es2022? Looks like it was Electron 19.0.17 based on Node 16.14.2 but I am not sure how to find the compatibility.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I will check on that, thank you for pointing that out.

@@ -1,14 +1,17 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"target": "ES2022",
"moduleResolution": "node",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I was reading thatnode was renamed tonode10 andnode is a deprecated alias now.

This is a change from the default, right? Supposedlynode10 is not meant to be used anymore but idk exactly what the consequences are.

jaggederest reacted with eyes emoji
"strict": true,
"esModuleInterop": true
"esModuleInterop": true,
"skipLibCheck": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This loosens some type checking, right? Do we need to disable it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I don't believe we do, I'll revert that.

jaggederestand others added2 commitsJune 17, 2025 18:10
- Add parserOptions.project to enable type-aware linting- Disable @typescript-eslint/require-await rule for markdown files- Remove unnecessary async keywords from functions without await🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@code-ashercode-ashercode-asher left review comments

Copilot code reviewCopilotCopilot left review comments

@aslilacaslilacAwaiting requested review from aslilac

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@jaggederest@aslilac@code-asher

[8]ページ先頭

©2009-2025 Movatter.jp