| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
update issue template | 8 个月前 | |
Refactoring and cleanup (#3835) * Refactoring and cleanup * switch to lefthook instead of husky * updated lefthook config * Updated eslint * merge cleanup * approve lefthook * increased test timeout * ignore tests in codeql * Fix typo * Fix instructions * updated lefhook | 9 个月前 | |
Convert to ESM (#3860) * Convert extension to ESM and improve Prettier module loading This PR converts the extension from CommonJS to ESM modules and improves how Prettier is loaded and resolved. Key changes: **ESM Conversion** - Convert all source files to use ESM imports/exports - Update esbuild configuration for ESM output - Add .js extensions to all relative imports - Update tsconfig for ESM module resolution **Prettier Module Loading** - Lazy-load bundled Prettier using dynamic import() for faster activation - Remove worker thread implementation (PrettierWorkerInstance) - now use PrettierDynamicInstance which loads Prettier dynamically - Improve plugin loading to resolve and import plugins as ES modules - Add utility functions for finding modules (find-up, resolve-module-entry) **Extension Activation** - Make activate() async and await formatter registration - Ensures formatters are ready when extension.isActive becomes true - Fixes race condition where tests could run before formatters registered **Test Infrastructure** - Add ensureExtensionActivated() helper for reliable test setup - Extract common format test utilities to formatTestUtils.ts - Update test imports for ESM compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add test for ESM config with plugin import statements Tests loading plugins via ESM import in prettier.config.mts files, which is a new feature in Prettier 3.5.0+. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Formatting * Update readme migraiton warning to remove github admonition * Simplify resolveModuleEntry to use Node's built-in resolution Replace manual package.json parsing with createRequire().resolve() which handles all the complexity of exports, main fields, and fallbacks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Rename module resolver files with platform suffix - Rename ModuleResolver.ts → ModuleResolverNode.ts (desktop) - Rename BrowserModuleResolver.ts → ModuleResolverWeb.ts (browser) - Keep class export name as ModuleResolver for simplicity - Update esbuild browser alias plugin for new file names - Update documentation to reflect new file naming convention 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix resolveModuleEntry to resolve from module's directory Create the require function from within the target module's directory so Node's resolution works correctly for local Prettier installations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Simplify plugin loading: pass paths to Prettier instead of pre-loading - Fix scoped package resolution in resolveModuleEntry (e.g., @prettier/plugin-xml) - Simplify plugin loading to just resolve paths and let Prettier import them - Update browser languages script to dynamically get plugin list from prettier exports 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Read package name from package.json instead of parsing path 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Simplify plugin resolution to match Prettier CLI behavior - Handle URLs, absolute paths, relative paths, and package names - Use createRequire to resolve packages from file's directory - Remove unused findUp import 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix plugin loading for Prettier v2 and improve module resolution - Use require.resolve with createRequire from target directory - Only convert plugin paths to file:// URLs for Prettier v3+ - For Prettier v2, pass absolute paths that require() can handle 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> | 9 个月前 | |
Update workflows and various housekeeping (#3826) * Update workflows and various housekeeping * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> | 9 个月前 | |
Cleanup old workflows (#4003) | 3 个月前 | |
Use npm and update bundling (#3846) * Use npm and update bundling * Add pnpm to main action * Add missing package | 9 个月前 | |
Update SECURITY.md | 6 年前 | |
Revert publisher back to esbenp (#3899) * Revert publisher back to esbenp * Fix web test by using stable VS Code and adding timeout - Add timeout-minutes: 10 to web test workflow job to prevent 6-hour hangs - Use quality: "stable" instead of insiders to avoid potential instability with VS Code Insiders builds causing 404 errors Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> | 8 个月前 | |
Switch from yarn to pnpm (#3831) * Update workflows and various housekeeping * Use pnpm instead of yarn * Missing dep * test updates, run web tests * Fix pnpm module resolution and web test compilation - Fix web extension test by using test-compile instead of just webpack (TypeScript needs to be compiled before running web tests) - Add findPkgThroughTransitiveDeps to ModuleResolver to support pnpm's strict node_modules structure (non-hoisted dependencies) - Pin prettier version in module-dep test fixture to 2.0.2 for test consistency The new module resolution logic: 1. First checks for explicit prettier dependency in package.json 2. Then checks transitive dependencies by looking at installed packages in node_modules and resolving prettier from within each dependency 3. Falls back to looking for node_modules/prettier directly This ensures the extension works correctly with npm, yarn, and pnpm regardless of their dependency hoisting behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Install Playwright browsers in CI for web tests The web extension tests use @vscode/test-web which requires Playwright to run browser-based tests. Add explicit Playwright chromium installation step before running web tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Extract pretest install logic to Node.js script Replace the extremely long pretest command with a cross-platform Node.js script that: - Automatically finds all test fixture directories - Reads the packageManager field from each package.json - Runs the appropriate install command (yarn, npm, or pnpm) - Handles nested fixtures (like explicit-dep/implicit-dep) Also update PR template to reference pnpm instead of yarn. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add pnpm minimumReleaseAge to match dependabot cooldown Configure pnpm to only install packages that are at least 7 days old. This matches our dependabot configuration (default-days: 7) and provides a stability buffer against newly published compromised packages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * All approved postinstall scripts * fix lock action * Improve workspace isolation for test fixtures - Add packages exclusion for test-fixtures in pnpm-workspace.yaml - Remove --ignore-workspace flag from install script (no longer needed) - Add pnpm-lock.yaml to gitignore for test fixtures (they're generated) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fixed issues workflow * update pnpm settings * --no-frozen-lockfile * Restore --ignore-workspace for fixture installs The packages exclusion in pnpm-workspace.yaml doesn't prevent pnpm from treating fixtures as part of the workspace - it just excludes them from being workspace packages. Without --ignore-workspace, pnpm runs the root's lifecycle scripts instead of installing fixture deps. Keep autoInstallPeers: true to match pnpm 10 defaults and prevent lockfile config mismatch errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> | 9 个月前 | |
Update workflows and various housekeeping (#3826) * Update workflows and various housekeeping * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> | 9 个月前 | |
Update workflows and various housekeeping (#3826) * Update workflows and various housekeeping * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> | 9 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 3 个月前 | ||
| 9 个月前 | ||
| 6 年前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 |