mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 01:32:42 +08:00
DEV: Switch to pnpm for JS dependencies (#28671)
This will bring significant improvements to install speed & storage requirements. For information on how it may affect you, see https://meta.discourse.org/t/324521 This commit: - removes the `yarn.lock` and replaces with `pnpm-lock.yaml` - updates workspaces to pnpm format - adjusts package dependencies to work with pnpm's stricter resolution strategy - updates Rails app to load modules from more specific node_modules directories - adds a `.pnpmfile` which automatically cleans up old yarn-managed `node_modules` directories - updates various scripts to call `pnpm` instead of `yarn` - updates patches to use pnpm's native patch system instead of patch-package - adds a patch for licensee to support pnpm
This commit is contained in:
21
patches/decorator-transforms@2.0.0.patch
Normal file
21
patches/decorator-transforms@2.0.0.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff --git a/dist/index.js b/dist/index.js
|
||||
index fce3aeb..c23d8e4 100644
|
||||
--- a/dist/index.js
|
||||
+++ b/dist/index.js
|
||||
@@ -4,10 +4,13 @@ import {
|
||||
import "./chunk-CSAU5B4Q.js";
|
||||
|
||||
// src/index.ts
|
||||
-import { createRequire } from "module";
|
||||
+
|
||||
import { ImportUtil } from "babel-import-util";
|
||||
-var req = createRequire(import.meta.url);
|
||||
-var { default: decoratorSyntax } = req("@babel/plugin-syntax-decorators");
|
||||
+
|
||||
+// https://github.com/ef4/decorator-transforms/pull/27
|
||||
+import PluginSyntaxDecorators from "@babel/plugin-syntax-decorators";
|
||||
+const decoratorSyntax = PluginSyntaxDecorators.default || PluginSyntaxDecorators;
|
||||
+
|
||||
function makeVisitor(babel) {
|
||||
const t = babel.types;
|
||||
return {
|
Reference in New Issue
Block a user