1. 15 Nov, 2021 14 commits
  2. 12 Nov, 2021 4 commits
  3. 11 Nov, 2021 4 commits
    • Robert Knight's avatar
      Prevent Node globals from being included in typechecking environment · 63545fd3
      Robert Knight authored
      By default TypeScript includes all `@types/<name>` packages. This includes
      @types/node, though we don't use it directly, because it is a transitive
      dependency (see `yarn why @types/node`).
      
      As a result Node's globals are added to the environment TS sees, even though
      they don't really exist when our code runs in a browser. These globals
      include overloads for `setTimeout` and `setInterval` which return a different
      type (`Timeout`), causing spurious errors when assigning the result to a number.
      
      Fix the problem by using the `types` option [1] in tsconfig.json to explicitly
      specify which `@types/<name>` packages  to include when checking code in src/
      This does mean that if we ever intentionally add @types packages which declare
      globals (eg. for mocha), we'll need to explicitly list them here.
      
      In the process the ES target was updated to fix an error about a `BigInt` reference.
      
      [1] https://www.typescriptlang.org/tsconfig#types
      63545fd3
    • Robert Knight's avatar
      Adapt to `useRef` type changes · 8ee4ceca
      Robert Knight authored
      `useRef(null as T|null)` now returns a `{ current: T|null }` instead of
      `{ current: T }` as it did before. ie. it no longer drops the the null.
      This makes sense but conflicted with a pattern we used in many places to
      create a non-null ref: `useRef(/** @type {T|null} */ (null))`.
      
      Resolve this by changing all non-nullable refs, for elements which are
      set after the initial render, to cast the `useRef` result instead of the
      init value.
      
      ```
      const nonNullRef = /** @type {{ current: T }} */ (useRef());
      ```
      8ee4ceca
    • dependabot[bot]'s avatar
      Bump preact from 10.5.13 to 10.5.15 · 2bb54dcd
      dependabot[bot] authored
      Bumps [preact](https://github.com/preactjs/preact) from 10.5.13 to 10.5.15.
      - [Release notes](https://github.com/preactjs/preact/releases)
      - [Commits](https://github.com/preactjs/preact/compare/10.5.13...10.5.15)
      
      ---
      updated-dependencies:
      - dependency-name: preact
        dependency-type: direct:development
        update-type: version-update:semver-patch
      ...
      Signed-off-by: 's avatardependabot[bot] <support@github.com>
      2bb54dcd
    • Robert Knight's avatar
      Remove two unused dependencies · da7a056a
      Robert Knight authored
      - @actions/core was used when the @hypothesis/frontend-shared package was
        part of the client repo.
      - postcss-url was used prior to the introduction of
        @hypothesis/frontend-build
      da7a056a
  4. 09 Nov, 2021 9 commits
  5. 04 Nov, 2021 1 commit
    • Robert Knight's avatar
      Update two test dependencies to ESM versions · c2b117b5
      Robert Knight authored
      Update babel-plugin-mockable-imports and enzyme-adapter-preact-pure to
      the newest versions which have ES module builds.
      
      This is primarily to verify that these releases, which I maintain, work
      in a real application.
      c2b117b5
  6. 03 Nov, 2021 8 commits