-
Notifications
You must be signed in to change notification settings - Fork 800
Comparing changes
Open a pull request
base repository: stenciljs/core
base: v2.17.0
head repository: stenciljs/core
compare: v2.17.1
Commits on Jun 21, 2022
-
chore(tests): restore expectFiles functionality (#3420)
this commit fixes a testing utility, `expectFiles`. prior to this commit, the testing utility would call through to a file system interface to verify that a file existed. however, the utility didn't do anything with the results, as the return value of the file's existence check: 1. didn't throw an `Error` 2. returned an object to designate whether the file existed or not (which was subsequently never queried) this commit changes that behavior by `throw`ing in the event one or more files cannot be found, and printing a message to the screen. `throw Error()` was chosen over jest's `fail()` for 2 reasons: 1. it doesn't couple us to the jest testing library 2. (selfishly), it's easier to test this commit _does_ add tests for the testing utility. at a certain point, it does feel a little bit like overkill. however, this testing utility is important in verifying that the output targets work properly. the situation of the helper being broken for so long does give some credence to having ~5 tests to verify it works properly
Configuration menu - View commit details
-
Copy full SHA for aee5287 - Browse repository at this point
Copy the full SHA aee5287View commit details
Commits on Jun 22, 2022
-
chore(lint): add lint for @returns (#3430)
this commit enables multiple lint rules provided by the jsdoc plugin regarding `@returns` in jsdocs. the intent behind this commit is to ensure that jsdocs have a documented `@returns` field and description where applicable, to catch missing ones in ci rather than in code review. there is one known limitation of these rules - when adding a jsdoc to a function that also has a decorator applied: ```typescript /** * A description * @returns the luckiest number in the world */ @SomeDecorator() function getLuckyNumber(): number { return 7; } ``` the rule will error based on the return type of the decorator, rather than the function. there was only a single violation of this in all of stencil's code, which was removed. i'm inclined to use this rule and use 'eslint-ignore' directives if absolutely necessary, but would be open to arguments against it
Configuration menu - View commit details
-
Copy full SHA for 4656dce - Browse repository at this point
Copy the full SHA 4656dceView commit details
Commits on Jun 23, 2022
-
fix(compiler): handle null window.location.origin (#2813)
when using a data URI or file URI (#2582), or when using iframe's `srcdoc`, the value for window.location.origin can be `null`. in these particular cases, passing `null` to `new URL(url, null)` will throw the following error: "Failed to construct 'URL': Invalid base URL"
Configuration menu - View commit details
-
Copy full SHA for 255cd66 - Browse repository at this point
Copy the full SHA 255cd66View commit details
Commits on Jun 27, 2022
-
chore(compiler): remove a few unused exports (#3440)
delete some unused exports from `src/compiler/app-core/bundle-app-core.ts` add a JSDoc to the `generateRollupOutput` function exported from that file.
Configuration menu - View commit details
-
Copy full SHA for c96e1d5 - Browse repository at this point
Copy the full SHA c96e1d5View commit details -
refactor(cli): refactor parse-flags module (#3427)
this refactors the parse-flags module, removing some code duplication and changing how the `ConfigFlags` interface is declared. Now the ConfigFlags interface is generated based on the content of a few read-only arrays of strings. This means that config flags are listed in one and only one placed and cannot drift / get out of sync.
Configuration menu - View commit details
-
Copy full SHA for b61afd5 - Browse repository at this point
Copy the full SHA b61afd5View commit details
Commits on Jun 28, 2022
-
chore(test): restore doNotExpectFiles (#3435)
this commit restores the `doNotExpectFiles` utility helper under test. this commit is compliment to aee5287, which got the `expectFiles` testing utility under test. `doNotExpectFiles` was renamed to `expectFilesDoNotExist` to give the helper's intent better clarity. similarly, `expectFiles` was renamed to `expectFilesExist` for the same reason. all callsites were updated accordingly this commit makes a few assumptions about how we will use this utility function. namely, it only throws an exception if one or more files provided by a caller are found. it does not check the permissions on the file path (it appears that a previous implementation would take this into account). should we decide to re-implement file access, we can do so at a later date. similar to aee5287, this re-implementation throws instead of using jest's `fail()` utility for ease of testing the utility function (and doesn't couple the utility to jest itself)
Configuration menu - View commit details
-
Copy full SHA for 247fcaf - Browse repository at this point
Copy the full SHA 247fcafView commit details -
chore(github): clean up github labels (#3442)
this commit removes the 'reply received' label exemption from ionitron. we stopped using this label ~3 months ago. in that time, the issues in the backlog have all been re-triaged, and any issues with this label today _also_ have an additional exempt label. this is the next step in removing the label from the repo. this also renames the 'reply received' label in the contributing guide to 'awaiting reply' to align with the label we actually use. the 'help wanted' label mention was removed, as we don't use it today
Configuration menu - View commit details
-
Copy full SHA for 4e86d69 - Browse repository at this point
Copy the full SHA 4e86d69View commit details -
fix(cli): add explicit support for Jest CLI arguments (#3444)
This adds explicit support to our CLI argument parsing code for Jest's CLI arguments by adding entries to the arrays we use to parse 'known' arguments. We declare all the Jest CLI arguments (as pulled from [the file in which they're implemented](https://github.com/facebook/jest/blob/main/packages/jest-cli/src/cli/args.ts)) in `src/cli/config-flags.ts`, so all of these flags are now fully-supported 'first class' (if you will) CLI flags.
Configuration menu - View commit details
-
Copy full SHA for 700b3a9 - Browse repository at this point
Copy the full SHA 700b3a9View commit details -
test(cli): add tests for run.ts (#3441)
this commit adds initial unit tests for `run.ts`. the goal of these tests are to get the minimal amount of coverage under the `run` and `runTask` functions so that we can (eventually) begin to change the function signatures on the functions they invoke. specifically, the stencil team is looking to make the configuration object that is used throughout the compiler stricter by making fields no longer optional on the type (internally). as a part of that effort, we're reassessing what data fields functions need. we know that we will be changing the signatures of the tasks for 'help' and 'telemetry'. by adding tests around the invocation of these tasks, we can have greater trust in the changes that we're making
Configuration menu - View commit details
-
Copy full SHA for a6e0141 - Browse repository at this point
Copy the full SHA a6e0141View commit details
Commits on Jul 5, 2022
-
fix(styles): ensure styles are applied before paint (#3452)
this commit fixes a bug where styles from a stencil component would not be applied prior to render. the issue involved stylesheet construction & application not blocking render, causing the component to be created without styles applied. this commit moves from the `replace` function to the `replaceSync` function to properly await the call STENCIL-433: Stabilize Browserstack CI Tests
Configuration menu - View commit details
-
Copy full SHA for c47cec6 - Browse repository at this point
Copy the full SHA c47cec6View commit details -
chore(lint): add the Jest eslint plugin (#3447)
this does a few things to improve the code quality in our test suite: - add & configurate the eslint plugin for Jest (`eslint-plugin-jest`) - fix the violations of the Jest default ruleset (with the exception of a few things that we want to disable) - turn on a few non-default rules which are nice
Configuration menu - View commit details
-
Copy full SHA for 53b5e28 - Browse repository at this point
Copy the full SHA 53b5e28View commit details -
refactor(config): add internal strict configuration type (#3436)
This PR proposes a methodology where we could start to make `Config` entities stricter, by swapping them out with an internal, stricter version. It introduces a new `ValidatedConfig` type that can gradually introduce strictness on the `Config` entity. For this PR, the only field that is made required is the `flags` field. The `ValidatedConfig` type is used throughout the codebase following the validating of a user-supplied configuration. Public APIs cannot use `ValidatedConfig` without introducing a breaking change. As a result, an instance of `ValidatedConfig` is created and backfilled with the contents of the user provided config and any now necessary fields (defaulting them if the field is not provided). In making `flags` a required field, the signatures of any function that accessed the field was updated to accept an `ValidatedConfig`. Not every instance of `Config` in a function signature was updated in this PR as a result.
Configuration menu - View commit details
-
Copy full SHA for 6effbc9 - Browse repository at this point
Copy the full SHA 6effbc9View commit details -
refactor(style): refactor code in compiler/style/css-imports (#3433)
This refactors and documents some code in the module responsible for parsing css imports (src/compiler/style/css-imports.ts) and adds some tests to increase coverage. This commit also makes some edits to the general 'style' spec (`src/compiler/style/test/style.spec.ts`) which has been skipped for a while. The tests in this suite were 'end-to-end' unit tests of the style handling capabilities of the compiler, which we'd like to have again, but we can't reconstitute them until we get unit testing of the compiler stood back up again. So for now this ports a few tests out of `style.spec.ts` and into the relevant specfiles (like `css-imports.spec.ts`) and deletes a few tests from `style.spec.ts` which are no longer accurate (like testing for escaping certain characters).
Configuration menu - View commit details
-
Copy full SHA for 4ad33a7 - Browse repository at this point
Copy the full SHA 4ad33a7View commit details -
chore(tests): silence console.{log|warn|error} messages during tests (#…
…3431) this adds a little utility for replacing the `console` functions with mocks to silence any error messages and get our jest output under control. This function calls `afterAll` internally, so it will clean up after itself by restoring the original functions for `console.log`, `.error`, etc.
Configuration menu - View commit details
-
Copy full SHA for cb8ed20 - Browse repository at this point
Copy the full SHA cb8ed20View commit details
Commits on Jul 6, 2022
-
docs(karma): add running locally documentation (#3445)
this commit documents the ability to run the karma tests locally. in addition, it also removes hacks that developers once had to do in order to connect to browserstack locally, by introducing a new environment variable, LOCAL_BROWSERSTACK, that will allow the development team to tunnel into browserstack for local testing purposes
Configuration menu - View commit details
-
Copy full SHA for 658fdd8 - Browse repository at this point
Copy the full SHA 658fdd8View commit details -
test(prerender): wait for load event (#3455)
this commit fixes an issue where stencil's prerender tests that would begin to run before the entire pre-render application would be loaded. this is accomplished by moving from using the 'appload' event to the 'load' event to listen on by moving from the timeout associated with `setupDom` to the `waitForChanges` API our testing utilities provides STENCIL-433: Stabilize Browserstack CI Tests
Configuration menu - View commit details
-
Copy full SHA for c0aeac1 - Browse repository at this point
Copy the full SHA c0aeac1View commit details
Commits on Jul 8, 2022
-
chore(exports): remove unused exports (#3415)
resolve utility unused exports: this commit resolves issues found in the `src/utils` directory related to unused exports. 'ts-prune' seems to have issues when a file includes a direct import and an aliased import to the same location: ```typescript import { foo } from '../somewhere'; import * as Foo from '../somewhere'; ``` doing so causes erroneous unused exports (or so it seems). the import of `ParsePackageJsonResult` has been removed in favor of a simple namespaced/aliased import (either would work here, this was an arbitrary decision that minimizes code churn. we could have just as easily directly imported everything from 'util'). cases where helper functions were never used have been removed. otherwise, unnecessary export keywords were removed when a property/function/etc. was used in the file in which it was defined --- remove unused export TERMINAL_INFO --- remove unused transpilerId const this commit removes an unused constant from the `version.ts` file. in addition to verifying that the identifier and its string contents are not used in the codebase, the following was run to look for other commits containing the string: ``` git log -S transpilerId --source --all ``` although commits were found containing 'transpilerId', no existing usages of the string were found --- remove unused host-config this commit began by removing two unused exports from `host-config.ts`, `generateHostConfig` and `DEFAULT_MODE`. from those two deletions, additional functions and constants could be successively deleted, with each deletion begetting another deletion, and another deletion, etc. by the end, a single constant was left, `HOST_CONFIG_FILENAME`. that constant is used in a single file, in a single place. as a result, the filename was inlined
Configuration menu - View commit details
-
Copy full SHA for 23fd1f6 - Browse repository at this point
Copy the full SHA 23fd1f6View commit details -
chore(unused exports): remove unused export from validate-collection.…
…ts (#3462) remove a function called `getCollectionDistDir` defined in `src/compiler/config/outputs/validate-collection.ts` which does not appear to be used anywhere in the codebase.
Configuration menu - View commit details
-
Copy full SHA for 2756107 - Browse repository at this point
Copy the full SHA 2756107View commit details -
chore(exports): remove unused export from fetch-utils (#3463)
This removes an unused export from src/compiler/sys/fetch/fetch-utils.ts and inlines a function which was used in only one place. A JSDoc is added for the function that is changed.
Configuration menu - View commit details
-
Copy full SHA for 9b6d0ea - Browse repository at this point
Copy the full SHA 9b6d0eaView commit details -
refactor(config): make logger required on ValidatedConfig (#3457)
this commit adds the `Logger` instance to `ValidatedConfig`, requiring the latter to hold an instance of the former. the `validateConfig` function has been altered to accept an instance of `LoadConfigInit`, the minimal configuration object that is used to bootstrap a stencil task. this allows a central place for an unvalidated configuration to be validated. Tather than semi-validating a config and mutating it after the fact as a part of the load process (which is what was previously done), all required fields are set in one place* the `setupTestingConfig` function signature was altered to accept a `ValidatedConfig` rather than a `Config`, as it's only caller has access to a `ValidatedConfig`. this allows us to simplify some of the logic for generating a validated config for testing purposes. \* for cases where the config does not pass through `validateConfig`, such as `runTask`, we will attempt to pull a `Logger` off the unvalidated config, or create one if one does not exist this commit introduces a mock creation function, `mockLoadConfigInit` to init the configuration file that used to bootstrap a task. this mock creator is used throughout the test suite, in order to provide a `LoadConfigInit` entity for `validateConfig` this commit does surface the face that `validateConfig` is used throughout the testing suite, and that the suite(s) should be refactored to use more specific functions under test, rather than calling the larger `validateConfig` function. this is being considered 'out-of-scope' & saved for a future day this commit removes a flaky test that was discovered in refactoring the existing test suites. a top level configuration entity was not being properly reset between test runs, causing the test to fail. looking at the test, it no longer tests a valid path in the codebase - in running coverage before and after this change (with jest's cache disabled), we see no decrease in code coverage this commit removes `Logger` instances from telemetry-related calls. as a part of the larger effort to make `Logger` always available on the `ValidatedConfig` entity, we will always be able to use the instance that is stored on the configuration, allowing us to decrease the arity of the fn signature * review(ap): remove unneeded logger value * review(ap): inline config var
Configuration menu - View commit details
-
Copy full SHA for 3c95a71 - Browse repository at this point
Copy the full SHA 3c95a71View commit details -
chore(test): remove strictNullChecks from dev server validation (#3458)
this commit removes the strictNullCheck violations from tests for validating the dev server. it only removes those associated with an unvalidated configuration. we have no intention at the moment to make `devServer` or its subfields required on `Config`. regardless of what happens on `ValidatedConfig#devServer`, we needed to handle these unvalidated `devServer` instances
Configuration menu - View commit details
-
Copy full SHA for 641a101 - Browse repository at this point
Copy the full SHA 641a101View commit details
Commits on Jul 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3f2e55f - Browse repository at this point
Copy the full SHA 3f2e55fView commit details
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.