From 1b7c977c4744a3ea474379e5232348b2aa062dbc Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Tue, 11 Aug 2020 11:21:52 +0200 Subject: [PATCH] fix #789 async/await babel runtime generator error, use regenerator-runtime --- babel.config.js | 1 - build/packages/config.js | 1 - package.json | 1 - packages/tiptap-extensions/package.json | 1 + packages/tiptap-extensions/src/plugins/Suggestions.js | 1 + yarn.lock | 4 ++-- 6 files changed, 4 insertions(+), 5 deletions(-) diff --git a/babel.config.js b/babel.config.js index aa46dc120..c9649cff6 100644 --- a/babel.config.js +++ b/babel.config.js @@ -6,6 +6,5 @@ module.exports = { ], plugins: [ '@babel/plugin-syntax-dynamic-import', - '@babel/plugin-transform-runtime', ], } diff --git a/build/packages/config.js b/build/packages/config.js index 18feb3d5a..ace9db4e9 100644 --- a/build/packages/config.js +++ b/build/packages/config.js @@ -35,7 +35,6 @@ function genConfig(opts) { }), babel({ exclude: 'node_modules/**', - runtimeHelpers: true, }), ], external(id) { return !/^[\.\/]/.test(id) }, diff --git a/package.json b/package.json index 0116c8633..e0ea5a313 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "@babel/plugin-transform-runtime": "^7.7.4", "@babel/preset-env": "^7.7.4", "@babel/preset-stage-2": "^7.0.0", - "@babel/runtime": "^7.7.4", "audit-ci": "^2.4.2", "autoprefixer": "^9.7.3", "babel-core": "^7.0.0-bridge.0", diff --git a/packages/tiptap-extensions/package.json b/packages/tiptap-extensions/package.json index 1161b4838..7dd7c8e1c 100644 --- a/packages/tiptap-extensions/package.json +++ b/packages/tiptap-extensions/package.json @@ -30,6 +30,7 @@ "prosemirror-transform": "^1.2.7", "prosemirror-utils": "^0.9.6", "prosemirror-view": "^1.15.2", + "regenerator-runtime": "^0.13.7", "tiptap": "^1.29.4", "tiptap-commands": "^1.14.4" }, diff --git a/packages/tiptap-extensions/src/plugins/Suggestions.js b/packages/tiptap-extensions/src/plugins/Suggestions.js index 0f11f3ee6..64d10c393 100644 --- a/packages/tiptap-extensions/src/plugins/Suggestions.js +++ b/packages/tiptap-extensions/src/plugins/Suggestions.js @@ -1,6 +1,7 @@ import { Plugin, PluginKey } from 'prosemirror-state' import { Decoration, DecorationSet } from 'prosemirror-view' import { insertText } from 'tiptap-commands' +import 'regenerator-runtime/runtime' // Create a matcher that matches when a specific character is typed. Useful for @mentions and #tags. function triggerCharacter({ diff --git a/yarn.lock b/yarn.lock index d977ac8d3..7f17c5673 100644 --- a/yarn.lock +++ b/yarn.lock @@ -830,7 +830,7 @@ pirates "^4.0.0" source-map-support "^0.5.16" -"@babel/runtime@^7.7.4", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.8.4": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== @@ -11030,7 +11030,7 @@ regenerator-runtime@^0.11.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== -regenerator-runtime@^0.13.3, regenerator-runtime@^0.13.4: +regenerator-runtime@^0.13.3, regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==