- 21 Jul, 2021 3 commits
-
-
Robert Knight authored
The need for this "testing only" code can be removed by improving the way that we simulate the `connect` message being handled in tests.
-
Robert Knight authored
-
Eduardo Sanz García authored
Initially, I tried to if/else portions of the code to accommodate for `MessagePort`, aiming to avoid duplication of the code (like I did for `shared/frame-rpc.js` #3565). However, I found that, unlike `shared/frame-rpc.js`, this resulted into a spaghetti-type of code, not very understandable. Then, I decided to create two internal methods to support both the current communication using `Window` and the new `MessagePort`. This in my opinion leads to a clearer results, although some code is duplicated in both methods. This PR will result on a reduction in code coverage, which will be fix by #3590.
-
- 19 Jul, 2021 7 commits
-
-
dependabot[bot] authored
Bumps [karma-browserify](https://github.com/nikku/karma-browserify) from 8.0.0 to 8.1.0. - [Release notes](https://github.com/nikku/karma-browserify/releases) - [Commits](https://github.com/nikku/karma-browserify/compare/v8.0.0...v8.1.0) --- updated-dependencies: - dependency-name: karma-browserify dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@hypothesis/frontend-shared](https://github.com/hypothesis/frontend-shared) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/hypothesis/frontend-shared/releases) - [Changelog](https://github.com/hypothesis/frontend-shared/blob/v3.5.0/CHANGELOG.md) - [Commits](https://github.com/hypothesis/frontend-shared/compare/v3.4.0...v3.5.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>
-
Eduardo Sanz García authored
In addition, I simplified the execution of the callback.
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.943.0 to 2.948.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.943.0...v2.948.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 [axe-core](https://github.com/dequelabs/axe-core) from 4.2.3 to 4.3.1. - [Release notes](https://github.com/dequelabs/axe-core/releases) - [Changelog](https://github.com/dequelabs/axe-core/blob/develop/CHANGELOG.md) - [Commits](https://github.com/dequelabs/axe-core/compare/v4.2.3...v4.3.1) --- updated-dependencies: - dependency-name: axe-core 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.3.0 to 10.3.1. - [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.3.0...10.3.1) --- updated-dependencies: - dependency-name: autoprefixer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [eslint](https://github.com/eslint/eslint) from 7.30.0 to 7.31.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.30.0...v7.31.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
- 16 Jul, 2021 7 commits
-
-
Jon Betts authored
-
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
-