Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stenciljs/core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.17.2-0
Choose a base ref
...
head repository: stenciljs/core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.17.2
Choose a head ref
  • 13 commits
  • 47 files changed
  • 3 contributors

Commits on Jul 20, 2022

  1. chore(compiler): make outputTargets required on the ValidatedConfig (#…

    …3477)
    
    This makes the `outputTargets` field required on the `ValidatedConfig`
    type, allowing us to freely access `.outputTargets` on a validated
    configuration object in the compiler code without having to use the `!`
    operator, check `=== undefined`, etc.
    
    This includes changes to the places where a `ValidatedConfig` object is
    created to default `.outputTargets` to `[]` if no suitable value is
    present.
    alicewriteswrongs authored Jul 20, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c4d894f View commit details
  2. fix(mock-doc): add missing methods to the element mock (#3480)

    add the following method stubs to `MockElement`:
    - animate
    - requestFullscreen
    - scrollBy
    - scrollTo
    - scrollIntoView
    
    all functions accept zero arguments and return nothing (`undefined`).
    if in the future that premise needs to be revisited, the team will update
    the function signatures at their discretion
    erwinheitzman authored Jul 20, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    835e00f View commit details
  3. fix(cli): fix bug with parsing --fooBar=baz type CLI flags (#3483)

    This fixes a bug with how these flags were being parsed which was
    messing with Jest. Basically, the issue related to how the `knownArgs`
    array on the `ConfigFlags` object was being populated. For CLI key-value
    args of the format `--argName=value` the whole string
    `"--argName=value"` was being added _as well as_ the value string
    `"value"`, which had the effect of passing duplicate args to Jest.
    
    This refactors how such arguments are handled to always parse apart the
    argument name and the value, adding only the argument name and then the
    argument value, so that if you pass, for instance,
    `--outputFile=output.json`, the args passed to Jest will look like
    
    ```ts
    ['--outputFile', 'output.json']
    ```
    
    See #3471 and #3481 for more details
    alicewriteswrongs authored Jul 20, 2022
    Copy the full SHA
    65f5275 View commit details

Commits on Jul 21, 2022

  1. fix(compiler): update package.json validation for the 'module' field (#…

    …3475)
    
    This updates the validation around the `module` field in `package.json`
    to take the configured output targets into account. In particular, for
    `DIST_CUSTOM_ELEMENTS_BUNDLE` it should be something like
    `dist/index.js`, whereas for `DIST_CUSTOM_ELEMENTS` it should be
    something like `dist/components/index.js`.
    alicewriteswrongs authored Jul 21, 2022
    Copy the full SHA
    47c4ccb View commit details

Commits on Jul 22, 2022

  1. chore(mocks): update mockConfig, mockValidatedConfig to accept any pr…

    …operty (#3485)
    
    this commit adds a new parameter to `mockValidatedConfig`, `overrides`.
    the argument is optional, and defaults to an empty object literal. it is
    spread over the returned object to override and defaults put in place by
    this method. the `sys` argument is also removed, as it now can be safely
    derived from the `overrides` argument (and still falls back to a new
    `TestingSystem` if `overrides.sys` is falsy
    
    this commit adds an `overrides` parameter to `mockConfig`. `overrides`
    is a partial instance of `UnvalidatedConfig`, which defaults to an empty
    object literal. its contents are spread over the returned object,
    overriding the values put in place by default. it also removes the `sys` arg.
    ' this value is now derived from the provided `overrides`, falling back to a
    `TestingSystem` otherwise.
    
    the properties on `mockConfig` are sorted in this commit, to make
    finding them (by a human) easier. it is assumed that this is the "best"
    ordering for them, as no other grouping seems "obvious" at this time
    
    STENCIL-486: Update mockConfig, mockValidatedConfig to accept any property
    rwaskiewicz authored Jul 22, 2022
    Copy the full SHA
    8e03f45 View commit details
  2. chore(config): propagate ValidatedConfig through telemetry directory (#…

    …3484)
    
    this commit updates `telemetry.ts#hasAppTarget` to use `ValidatedConfig`
    as its argument, rather than an unvalidated one. the single caller of
    this function (outside of tests) already has been converted to receive a
    `ValidatedConfig`, making this conversion a matter of only updating the
    function signature.
    
    tests for this function were updated to adhere to the stricter
    requirements of a `ValidatedConfig`
    
    this commit updates `telemetry.ts#getActiveTargets` to use
    `ValidatedConfig` as its argument, rather than an unvalidated one. the
    single caller of this function already has been converted to receive a
    `ValidatedConfig`, making this conversion a matter of only updating the
    function signature.
    
    this commit updates the aforementioned function to use `ValidatedConfig`
    as its argument, rather than an unvalidated one. the single caller of
    this function (outside of tests) already has been converted to receive a
    `ValidatedConfig`, making this conversion a matter of only updating the
    function signature.
    
    tests for this function were updated to adhere to the stricter
    requirements of a `ValidatedConfig`. because we now use a stricter
    object, it has additional fields on it. this broke the existing
    assertions on the function's tests. the tests have been updated to
    maintain the original spirit/intent of the assertions.
    
    `d.Config` was kept as the return type (and consequently the type in
    `CONFIG_PROPS_TO_DELETE`), as we're modifying/removing fields from the
    `ValidatedConfig`. this "felt" like it would inevitably throw compiler
    errors as we make `ValidatedConfig` stricter. if/when we decide to get
    rid of `d.Config`, we can revisit (and the compiler will make us!)
    rwaskiewicz authored Jul 22, 2022
    Copy the full SHA
    bbdebf4 View commit details
  3. fix(cli): remove usage of deprecated npm env var from arg parser (#3486)

    This removes some code from our argument parsing implementation which
    would look for an environment variable (`npm_config_argv`) set by npm
    and, if present, merge CLI flags found their into the ones already
    present on `process.argv`.
    
    We want to remove this for two reasons:
    
    - `npm_config_argv` is deprecated in `npm` v7+, so in newer versions of the
      package manager it is no longer set and our code referencing it is
      effectively doing nothing
    - `yarn` v1.x still sets it (presumably for compatibility with `npm`
      that hasn't been removed yet, which causes an inconsistency between
      `npm` and `yarn` where certain `package.json` scripts will run without
      issue in `npm` but fail in `yarn` (see #3482)
    
    Accordingly, this commit deletes the offending function from
    `src/cli/parse-flags.ts` and makes a few related changes at call sites,
    etc which are necessary due to that change.
    
    This commit also refactors the spec file for `parse-flags.ts` to remove
    redundant tests. Because all of the supported CLI arguments (i.e. those
    added to `knownArgs`) are defined in `ReadonlyArray<string>` variables
    we can do a lot of exhaustive testing of all the arguments, set in the
    various possible permutations, etc, so we don't need to define a bunch
    of individual tests. Accordingly, the test file is refactored to remove
    redundant tests, add a few more test cases for the exhaustive tests,
    organize things a bit more with `describe` blocks, and ensure that we
    have good tests around all off the 'edge-case-ey' things.
    alicewriteswrongs authored Jul 22, 2022
    Copy the full SHA
    22d9858 View commit details

Commits on Jul 26, 2022

  1. chore(telemetry): remove info task telemetry call (#3487)

    this commit removes a telemetry call from stencil for the info task.
    this call never actually worked, and is something that we don't feel we
    want/need to collect.
    
    it also has an additional positive side effect for making the stencil
    configuration entity stricter - this call was placed before
    loading/validating a configuration (because doing so is not required to
    run the info task, making it faster). as `ValidatedConfig` grew in size,
    additional fields were added to make a bespoke validated config.
    removing this call removes the need to maintain the config used, making
    the process of making `ValidatedConfig` stricter slightly easier
    rwaskiewicz authored Jul 26, 2022
    Copy the full SHA
    6fba6bb View commit details

Commits on Jul 27, 2022

  1. chore(config): make sys required on ValidatedConfig (#3491)

    this commit makes the `sys` property required on `ValidatedConfig`. this
    work decreases the number of `strictNullCheck` violations in the
    codebase. it does not fix every violation pertaining to `config.sys`
    usage - rather, it seeks to be the minimal work necessary to
    
    1. make the `sys` property required on `ValidatedConfig`
    2. prevent introducing breaking compilation errors
    rwaskiewicz authored Jul 27, 2022
    Copy the full SHA
    a6a9171 View commit details
  2. chore(run): remove unneeded CompilerSystem checks (#3494)

    In 66d0476 (#3079), we added a truthy check for `CompilerSystem` entities.
    With the recent move to making that entity required on a `ValidatedConfig` entity
    (a6a9171 - #3491), these checks can be safely removed.
    
    This PR removes cases throughout the code base where a truthy check is
    required in order to call a function that requires it. In every case, we are able to
    utilize the fact that the calling function has an instance of `ValidatedConfig`, which
    now has a `sys` on it. 
    
    The original belief was that this would need to be a breaking change (this was
    months ago when the ticket was originally written). However, the foundation of this
    PR  (a6a9171) does not require this to be a breaking change anymore.
    rwaskiewicz authored Jul 27, 2022
    Copy the full SHA
    991843a View commit details

Commits on Aug 1, 2022

  1. feat(ci): fail the browserstack tests if any files were changed or a…

    …dded (#3495)
    
    This adds a small check to the end of our browserstack CI tests which just
    tries to ensure that no files were changed or added while the tests were
    running.
    
    STENCIL-451: Add CI Checks for a Dirty Git Context
    alicewriteswrongs authored Aug 1, 2022
    Copy the full SHA
    4fdac13 View commit details
  2. chore(compiler): add JSDocs to functions relating to component props (#…

    …3492)
    
    This documents a few functions and interfaces which have to do with
    dealing with component properties, as well as some utils which are used
    to creating TypeScript IR for values that we're dealing with at
    compile-time.
    alicewriteswrongs authored Aug 1, 2022
    Copy the full SHA
    b4fc7ea View commit details
  3. 🍤 v2.17.2

    rwaskiewicz committed Aug 1, 2022
    Copy the full SHA
    4dc1d74 View commit details
Loading