- 16 Jul, 2021 6 commits
-
-
Eduardo Sanz García authored
The word `listener` matches better the internal property names of `this.channelListeners` and `this.onConnectListeners`. In addition, it helps to differentiate from the `callback` function which is the last (optional) argument of the `listener`. The `callback` is used to send back a `postMessage` response to the other frame/s.
-
Eduardo Sanz García authored
The RPC class design requires all the handlers to be provided up-front. Currently, adding a new handler after a channel is created has no effect. To make more obvious this misuse, the method now throws an error.
-
Eduardo Sanz García authored
`this.link` was defined as `Array<{channel: RPC, window: Window}>` however, the `window` property was never used. I am guessing that the original idea was to avoid creating additional channels for the same frame, however, that was never implemented. I take the decision of removing the `window` property and converting the `this.link` to a type of `RPC[]`.
-
Eduardo Sanz García authored
As far as I know, the `return` statement don't have any effect.
-
Eduardo Sanz García authored
As pointed by @robertknight `Array.from` was probably a leftover from the tool that was used to convert CoffeeScript to JavaScript.
-
Eduardo Sanz García authored
I also include a minor change to improve the readability extracting the callback from the `args`.
-
- 15 Jul, 2021 8 commits
-
-
Kyle Keating authored
This reverts commit e466e836.
-
Kyle Keating authored
This reverts commit ede3280f.
-
Kyle Keating authored
The tag filter's regex was not capturing words at the start of a line which had non-word ASCII or unicode characters. Additionally it was not escaping special chars for the regex query. This fix first splits the tag based on words, escapes the query, searches for any match, and then additionally checks the entire tag against the query
-
Kyle Keating authored
The tag filter's regex was not capturing words at the start of a line which had non-word ASCII or unicode characters. Additionally it was not escaping special chars for the regex query. This fix first splits the tag based on words, escapes the query, searches for any match, and then additionally checks the entire tag against the query
-
Kyle Keating authored
The regex-ex was not capturing words at the start of a line which had ASCII characters. This fix first splits the string based on words and searches for any match and then additionally checks the entire string against the query
-
Robert Knight authored
This method is available after including the `dom.iterable` typings. Also the use of `entries()` is unnecessary because the result is the same as directly iterating over the `URLSearchParams` instance. Also add an example for `stringify`.
-
Robert Knight authored
For the client's very simple query string generating and parsing needs we can avoid this dependency by using a very simple wrapper around `URLSearchParams`. This also improves type checking since this dependency didn't provide types and we weren't using the @types/query-string package. The `stringify` function sorts parameters in the returned string for consistency with query-string's behavior.
-
Eduardo Sanz García authored
This method was not used anywhere. In addition for this method to have the intended effect, it needed to be called before `createChannel`, because at that point the methods are registered with the `RPC` class and there is no way to remove the listeners.
-
- 14 Jul, 2021 7 commits
-
-
Robert Knight authored
The `Bridge` code was written before we had good mocking tools in the client. As a result the `Bridge` class mocks `RPC` in an unconventional way where it constructs the real class, but then stubs out specific methods. Also tests varied in the degree to which they tested only `Bridge` vs Bridge + RPC together. This commit mocks `RPC` in bridge-test.js using our standard mocking tools and makes all tests in the file unit tests. This involved some significant changes to the `onConnect` tests.
-
Eduardo Sanz García authored
* change `@deprecated` for a comment * added a test to cover some missing lines in `_isValidSender` function. * `_isValidMessage` renamed to `_parseMessage` * created helper function `waitForMessageDelivery` * parametrise test
-
Eduardo Sanz García authored
RPC: * added `@deprecated` statements and additional comments * removed `this._destroyed` for the listener checks, because the listener is removed when called `destroy()`. * added `this._port.close()` in addition to removing the listner. `bridge-test`: * refactor all the `function () {}` to arrow functions `frame-rpc-test.js`: * added these tests to check the `MessageChannel` functionality.
-
Eduardo Sanz García authored
-
Eduardo Sanz García authored
Created a couple of utility methods to avoid duplication of code and enable to decouple RPC for `Window` or for `MessagePort`.
-
Eduardo Sanz García authored
It simplifies the code.
-
Eduardo Sanz García authored
It is a bit of a Frankenstein. The plan is to clean up on the next commits.
-
- 13 Jul, 2021 5 commits
-
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.939.0 to 2.943.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.939.0...v2.943.0) --- updated-dependencies: - dependency-name: aws-sdk dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.2.9 to 2.3.0. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/2.2.9...2.3.0) --- updated-dependencies: - dependency-name: dompurify dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [sass](https://github.com/sass/dart-sass) from 1.35.1 to 1.35.2. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.35.1...1.35.2) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.8.0 to 6.9.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/6.8.0...6.9.0) --- updated-dependencies: - dependency-name: "@sentry/browser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.2.6 to 10.3.0. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/autoprefixer/compare/10.2.6...10.3.0) --- updated-dependencies: - dependency-name: autoprefixer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
- 12 Jul, 2021 1 commit
-
-
Kyle Keating authored
Per WCAG 2.1 criterion: 2.5.3 Label in Name--we should not differentiate between the aria-label and the visual name in an input element. In the case of the TagEditor, the `placeholder` and `aria-label` were different. The simple fix is to remove `aria-label`. The second problem is with AnnotationPublishControl's button where the `aria-label` and button's text did not match. Again, the simple fix is to remove `aria-label`.
-
- 09 Jul, 2021 2 commits
-
-
Robert Knight authored
Enforce the use of object shorthand syntax everywhere for consistency. eg. `{ foo }` instead of `{ foo: foo }`. We had already converted most occurrences manually.
-
Robert Knight authored
We've been gradually converting anonymous functions to arrow functions since adopting ES6. This commit uses ESLint to finish the process by converting the remaining non-named, non-`this`-using callbacks to arrow functions. - Enable `prefer-arrow-callbacks` lint rule. The `allowNamedFunctions` option is enabled because we have a few instances (eg. in gulpfile.js) of explicitly naming functions for use in debugging / logging etc. - Run `eslint --fix .` and `yarn format` to automatically fix up the code
-
- 07 Jul, 2021 1 commit
-
-
dependabot[bot] authored
Bumps [@hypothesis/frontend-shared](https://github.com/hypothesis/frontend-shared) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/hypothesis/frontend-shared/releases) - [Changelog](https://github.com/hypothesis/frontend-shared/blob/main/CHANGELOG.md) - [Commits](https://github.com/hypothesis/frontend-shared/compare/v3.3.0...v3.4.0) --- updated-dependencies: - dependency-name: "@hypothesis/frontend-shared" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
- 06 Jul, 2021 10 commits
-
-
Kyle Keating authored
The adder now hides when the escape key is pressed. (WCAG 2.1 criterion 1.4.13)
-
Robert Knight authored
Given the way the `Socket` helper currently works, the `connect` helper cannot be called while there is already a connection. `connect` is called once during the initial `Socket` constructor and subsequently to initiate an automatic reconnect in the event of an abnormal disconnection. In both cases there is no existing connection.
-
Robert Knight authored
Document the type and purpose of `operation` variable and fix a hazard where it was assigned a timeout ID instead of a `RetryOperation`, which would cause code expecting it to be a `RetryOperation` to fail.
-
Robert Knight authored
- Add tests for "message" and "error" events when the corresponding events are received on the underlying `WebSocket` - Add tests for eventual abort of reconnections
-
Robert Knight authored
Modernize our auto-reconnecting wrapper for `WebSocket` to match current conventions in the client and improve the documentation. - Use named rather than default exports - Convert functions to arrow functions and remove unneeded `self` alias. - Add JSDoc comments and types A circular reference between the `connect` and `onAbnormalClose` functions was broken by adding a second argument to `onAbnormalClose`.
-
dependabot[bot] authored
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.6.3 to 18.6.7. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v18.6.3...v18.6.7) --- updated-dependencies: - dependency-name: "@octokit/rest" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.4 to 4.3.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.4...v4.3.5) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.15.1 to 3.15.2. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.15.2/packages/core-js) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.936.0 to 2.939.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.936.0...v2.939.0) --- updated-dependencies: - dependency-name: aws-sdk dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 10.0.0 to 10.1.0. - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md) - [Commits](https://github.com/puppeteer/puppeteer/compare/v10.0.0...v10.1.0) --- updated-dependencies: - dependency-name: puppeteer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-