DEV: move deprecation silencer to a shared package (#22668)

This babel plugin is intended to supress the deprecation warnings
from building plugins, however, discourse-plugins does not actually
consume this plugin at all. Currently this happens to work due to
how the babel worker processes are shared and the timing/ordering
of the build, but it will stop working with the embroider build.

This commit extracts the plugin the a shared package so that it
can be properly consumed by discourse-plugins as well as core.
This commit is contained in:
Godfrey Chan
2023-07-18 11:07:20 -07:00
committed by GitHub
parent 5fbce985a8
commit 3c69570b75
7 changed files with 25 additions and 2 deletions

View File

@ -90,6 +90,12 @@ function parsePluginName(pluginRbPath) {
module.exports = {
name: require("./package").name,
options: {
babel: {
plugins: [require.resolve("deprecation-silencer")],
},
},
pluginInfos() {
const root = path.resolve("../../../../plugins");
const pluginDirectories = fs