Skip to content

chore(config): coerce sourceMap config value to boolean #3035

Merged
rwaskiewicz merged 2 commits intorwaskiewicz-rebase-again-sourcemapsfrom
rwaskiewicz/sourcemap-validate
Aug 30, 2021
Merged

chore(config): coerce sourceMap config value to boolean #3035
rwaskiewicz merged 2 commits intorwaskiewicz-rebase-again-sourcemapsfrom
rwaskiewicz/sourcemap-validate

Conversation

@rwaskiewicz
Copy link
Copy Markdown
Member

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Tests (npm run test.karma.prod) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

config.sourcemap can be either undefined | true | false when a user's configuration is validated. I'd prefer to narrow that to a boolean, even if we don't strictly do that using the type system right now. See this comment in the parent PR that expounds upon this

GitHub Issue Number: N/A

What is the new behavior?

ensure that upon validating a user's stencil config, the value of the
'sourcemap' field is never undefined.

Does this introduce a breaking change?

  • Yes
  • No

Testing

After checking this commit out, I:

  • installed dependencies (npm ci)
  • built the project and generated the tarball for it (npm run build && npm pack)
  • installed it on a fresh stencil project (npm stencil init && npm i <PATH_TO_TARBALL>)
  • started the project (npm start)
  • once Stencil's dev server had opened chrome, I opened dev tools and verified sourcemaps were still generated

Other information

N/A

ensure that upon validating a user's stencil config, the value of the
'sourcemap' field is never undefined.

to appease the type system
@rwaskiewicz rwaskiewicz requested a review from a team August 27, 2021 17:50
@rwaskiewicz rwaskiewicz merged commit 48a0927 into rwaskiewicz-rebase-again-sourcemaps Aug 30, 2021
@rwaskiewicz rwaskiewicz deleted the rwaskiewicz/sourcemap-validate branch August 30, 2021 13:48
rwaskiewicz added a commit that referenced this pull request Sep 20, 2021
ensure that upon validating a user's stencil config, the value of the
'sourcemap' field is never undefined.

remove unneeded 'bang bang' operators after forcing souremap to boolean
johnjenkins pushed a commit to johnjenkins/stencil that referenced this pull request Oct 7, 2021
ensure that upon validating a user's stencil config, the value of the
'sourcemap' field is never undefined.

remove unneeded 'bang bang' operators after forcing souremap to boolean
johnjenkins pushed a commit to johnjenkins/stencil that referenced this pull request Oct 7, 2021
ensure that upon validating a user's stencil config, the value of the
'sourcemap' field is never undefined.

remove unneeded 'bang bang' operators after forcing souremap to boolean
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.

2 participants