From 637dc84e1cf8312c86eef5d1bc75a38f68f7bf57 Mon Sep 17 00:00:00 2001 From: Dhruv Manek <506183+dmanek@users.noreply.github.com> Date: Fri, 25 Mar 2022 14:15:49 -0700 Subject: [PATCH] Remove UMD wrapper patch for mustache.js (#37942) --- third_party/mustache/compile.sh | 10 ------ .../patches/0000-remove-umd-wrapper.patch | 32 ------------------- 2 files changed, 42 deletions(-) delete mode 100755 third_party/mustache/compile.sh delete mode 100644 third_party/mustache/patches/0000-remove-umd-wrapper.patch diff --git a/third_party/mustache/compile.sh b/third_party/mustache/compile.sh deleted file mode 100755 index 540440388041..000000000000 --- a/third_party/mustache/compile.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -# Run this file with bash to convert the mustache library from UMD to ESM -# for inclusion into AMP. - -# Apply all the patches in third_party/mustache/patches/ -for patchfile in patches/*.patch -do - echo "Applying patch $patchfile" - patch < $patchfile -done diff --git a/third_party/mustache/patches/0000-remove-umd-wrapper.patch b/third_party/mustache/patches/0000-remove-umd-wrapper.patch deleted file mode 100644 index b24aba4fbef6..000000000000 --- a/third_party/mustache/patches/0000-remove-umd-wrapper.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/third_party/mustache/mustache.js b/third_party/mustache/mustache.js -index fcc0fe678..869e4f36f 100644 ---- a/third_party/mustache/mustache.js -+++ b/third_party/mustache/mustache.js -@@ -5,16 +5,7 @@ - - /*global define: false Mustache: true*/ - --(function defineMustache (global, factory) { -- if (typeof exports === 'object' && exports && typeof exports.nodeName !== 'string') { -- factory(exports); // CommonJS -- } else if (typeof define === 'function' && define.amd) { -- define(['exports'], factory); // AMD -- } else { -- global.Mustache = {}; -- factory(Mustache); // script, wsh, asp -- } --}(this, function mustacheFactory (mustache) { -+function mustacheFactory (mustache) { - - var objectToString = Object.prototype.toString; - var isArray = Array.isArray || function isArrayPolyfill (object) { -@@ -649,4 +640,8 @@ - mustache.Context = Context; - mustache.Writer = Writer; - --})); -+}; -+ -+const Mustache = {}; -+mustacheFactory(Mustache); -+export default Mustache;