Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Stencil): ensure strictConfig properties has default values if loadedConfig is undefined #1174

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

dgonzalezr
Copy link
Contributor

@dgonzalezr dgonzalezr commented Feb 14, 2025

The change ensures that the strictConfig object properties have default values if not provided in the loadedConfig or if loadedConfig is undefined.

When looking at the code, const loadedConfig = loadConfigResults.config where loadConfigResults results from an attempt to load a config:

const loadConfigResults = await loadConfig({
  config,
  configPath,
  logger,
  sys,
});
const loadedConfig = loadConfigResults.config;

meaning, perhaps, it could not be loaded at a certain point (according to the LoadConfigResults interface declaration on @stencil/core)

/**
 * Results from an attempt to load a config. The values on this interface
 * have not yet been validated and are not ready to be used for arbitrary
 * operations around the codebase.
 */
export interface LoadConfigResults {
    config: ValidatedConfig;
    diagnostics: Diagnostic[];
    tsconfig: {
        path: string;
        compilerOptions: any;
        files: string[];
        include: string[];
        exclude: string[];
        extends: string;
    };
}

Fixes: #1167

Copy link

nx-cloud bot commented Feb 14, 2025

View your CI Pipeline Execution ↗ for commit c759786.

Command Status Duration Result
nx affected --target lint build test e2e ✅ Succeeded 38s View ↗
nx-cloud record -- pnpm exec nx format:check ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-14 17:40:39 UTC

@dgonzalezr dgonzalezr changed the title fix(Stencil): ensure strictConfig object has default values if loadedConfig is undefined fix(Stencil): ensure strictConfig properties has default values if loadedConfig is undefined Feb 15, 2025
@DominikPieper DominikPieper merged commit d3357f9 into nxext:main Feb 18, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stencil: test randomly fails on CI pipelines
2 participants