Commit 8e2d612c authored by Robert Knight's avatar Robert Knight

Update @hypothesis/frontend-shared to v4.0.0

This required a couple of changes to adapt to the removal of the
CommonJS build. Some modules from the pattern library web app triggered
a Babel warning about top-level `this`. I copied across the workaround
from `rollup.config.js` in the @hypothesis/frontend-shared library.
parent 578a1cd8
......@@ -6,7 +6,7 @@ import {
// TODO: Update after https://github.com/hypothesis/frontend-shared/issues/179
// is resolved
import Library from '@hypothesis/frontend-shared/lib-cjs/pattern-library/components/Library';
import Library from '@hypothesis/frontend-shared/lib/pattern-library/components/Library';
export default function ButtonPatterns() {
return (
......
import { startApp } from '@hypothesis/frontend-shared/lib-cjs/pattern-library';
import { startApp } from '@hypothesis/frontend-shared/lib/pattern-library';
import ButtonPatterns from './components/ButtonPatterns';
import sidebarIcons from '../../src/sidebar/icons';
......
......@@ -13,7 +13,7 @@
"@babel/preset-env": "^7.1.6",
"@babel/preset-react": "^7.0.0",
"@hypothesis/frontend-build": "^1.0.1",
"@hypothesis/frontend-shared": "3.14.0",
"@hypothesis/frontend-shared": "^4.0.0",
"@octokit/rest": "^18.0.0",
"@rollup/plugin-alias": "^3.1.2",
"@rollup/plugin-babel": "^5.3.0",
......
......@@ -38,6 +38,12 @@ function bundleConfig({ name, entry, format = 'es' }) {
treeshake: isProd,
// Suppress a warning (https://rollupjs.org/guide/en/#error-this-is-undefined)
// due to https://github.com/babel/babel/issues/9149.
//
// Any code string other than "undefined" which evaluates to `undefined` will work here.
context: 'void(0)',
plugins: [
alias({
entries: [
......
......@@ -1131,10 +1131,10 @@
fancy-log "^1.3.3"
glob "^7.2.0"
"@hypothesis/frontend-shared@3.14.0":
version "3.14.0"
resolved "https://registry.yarnpkg.com/@hypothesis/frontend-shared/-/frontend-shared-3.14.0.tgz#0dc3f1f0df22841b19428840ea1318fcf3c8b6d1"
integrity sha512-vkgVGruGJyku8pVegV1/mxyyQjyeg1xLZNxFHaGkqZ9Ho5GYHgkmqv40Z6tfZbSXpcUpAGlHRVy5+fasgwhhOA==
"@hypothesis/frontend-shared@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@hypothesis/frontend-shared/-/frontend-shared-4.0.0.tgz#dbd136e7636e5eab37aa1b7690aacca8ce2a7f5a"
integrity sha512-zg6NH+te8ghqP6nUeC3fqIr6i0Er1njs7ySwFaZq4NIlZJTN+4ImK/DSMJF3aE8AWL0UwQpTfpJQKeaJuR51OA==
dependencies:
normalize.css "^8.0.1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment