Conversation
nrkruk
reviewed
Jun 27, 2025
| "flagAliases": [], | ||
| "flagChars": ["l", "n", "o"], | ||
| "flags": ["flags-dir", "get-latest", "guest", "name", "target-org"], | ||
| "plugin": "@salesforce/plugin-lightning-dev" |
Collaborator
Author
There was a problem hiding this comment.
There was an error about command-snapshot and I had to update it.
Collaborator
Author
There was a problem hiding this comment.
@nrkruk , can you run bin/dev.js snapshot:compare?
Collaborator
Author
There was a problem hiding this comment.
I just reverted the change. Weird.
Shinoni
commented
Jul 11, 2025
package.json
Outdated
| "type": "module", | ||
| "volta": { | ||
| "node": "20.11.0", | ||
| "node": "20.19.3", |
Collaborator
Author
There was a problem hiding this comment.
For some reason, the Node version in Volta is different from the one used in CI.
- Small comment added to README to trigger CI - Testing if @lwrjs/api issue exists in main branch CI - This will help isolate whether the TypeScript error is pre-existing or introduced by our changes
- Downgraded @oclif/plugin-command-snapshot from ^5.3.3 to ^5.3.2 - Added @salesforce/cli ^2.93.7 and dotenv ^16.5.0 dependencies - Added test:nut:local script - Updated volta Node.js version from 20.11.0 to 20.19.3 - Added yarn resolutions for @salesforce/core ^8.15.0 Testing if these package.json changes cause the @lwrjs/api TypeScript error in CI.
- Updated tsconfig.json to include ./src/**/*.d.ts files - Updated test/tsconfig.json to include ./**/*.nut.ts files - Testing if these TypeScript configuration changes cause @lwrjs/api module resolution issues in CI
- Added src/lwrjs-api.d.ts with type declarations for @lwrjs/api - Declares SitesLocalDevOptions type and expDev/setupDev functions - Testing if this TypeScript declaration file causes @lwrjs/api module resolution issues in CI - This is the most likely culprit for the TS7016 error
- Reverted yarn.lock to remove problematic dependencies from earlier package.json changes - This should resolve the mocha/cliui dependency conflict in CI - Now we can properly test if the TypeScript declaration file causes @lwrjs/api issues
- Added componentLocalPreview.nut.ts and supporting test infrastructure - Includes test helpers, test data, and test projects - Contains fixed dotenv import pattern (import * as dotenv) - Testing if NUT test files cause @lwrjs/api module resolution issues in CI
- Added dotenv ^16.5.0 to devDependencies - Required for componentLocalPreview.nut.ts test - Only adding dotenv, not other problematic dependencies
…icts - Removed dotenv import and config() call from componentLocalPreview.nut.ts - Using process.env directly instead of dotenv.config() - This avoids the mocha/cliui dependency conflict that was preventing CI tests - Now we can test if NUT test files cause @lwrjs/api issues without package.json changes
- Removed src/lwrjs-api.d.ts declaration file - Cleaned up tsconfig.json to remove .d.ts includes - Cleaned up test/tsconfig.json to remove .nut.ts includes - Testing if dependency fixes alone resolve @lwrjs/api issue without TypeScript declarations
- Fix mocha/cliui dependency conflict by adding cliui@7.0.4 resolution - Restore dotenv functionality for .nut.ts test files - Update test/tsconfig.json to properly include .nut.ts files - All 56 tests passing with dependencies resolved
- Added prerequisite that SF CLI must be installed before running integration tests locally - Clarifies that sf command must be available during local test execution - Provides installation link and verification command
bpbuch
approved these changes
Jul 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR introduces a comprehensive integration test for the local component preview functionality. The test file test/commands/lightning/dev/componentLocalPreview.nut.ts provides end-to-end validation of the sf lightning dev component command by:
Creating a complete SFDX project environment with a test LWC component (helloWorld)
Spawning an actual Lightning Dev Server process
Making real HTTP requests to verify the server responds correctly at http://localhost:3000/c-hello-world/
Validating proper kebab-case URL formatting (helloWorld → hello-world)
Testing server startup, HTTP 200 responses, and process cleanup
Including supporting utilities for test project setup and server management
What issues does this PR fix or reference?
@W-18852148@