From 23b60dc1975db38c280d8a123aff97544d1673e0 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:34:21 +0800
Subject: [PATCH] TODO#139890 FAQ 常見問題 1-文案調整

---
 PAMapp/node_modules/@babel/helper-create-class-features-plugin/lib/index.js |   35 ++++++++++++++---------------------
 1 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/PAMapp/node_modules/@babel/helper-create-class-features-plugin/lib/index.js b/PAMapp/node_modules/@babel/helper-create-class-features-plugin/lib/index.js
index 9f9eb93..8f15787 100644
--- a/PAMapp/node_modules/@babel/helper-create-class-features-plugin/lib/index.js
+++ b/PAMapp/node_modules/@babel/helper-create-class-features-plugin/lib/index.js
@@ -3,23 +3,23 @@
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
-exports.createClassFeaturePlugin = createClassFeaturePlugin;
-Object.defineProperty(exports, "injectInitialization", {
+Object.defineProperty(exports, "FEATURES", {
   enumerable: true,
   get: function () {
-    return _misc.injectInitialization;
+    return _features.FEATURES;
   }
 });
+exports.createClassFeaturePlugin = createClassFeaturePlugin;
 Object.defineProperty(exports, "enableFeature", {
   enumerable: true,
   get: function () {
     return _features.enableFeature;
   }
 });
-Object.defineProperty(exports, "FEATURES", {
+Object.defineProperty(exports, "injectInitialization", {
   enumerable: true,
   get: function () {
-    return _features.FEATURES;
+    return _misc.injectInitialization;
   }
 });
 
@@ -37,7 +37,9 @@
 
 var _features = require("./features");
 
-const version = "7.15.4".split(".").reduce((v, x) => v * 1e5 + +x, 0);
+var _typescript = require("./typescript");
+
+const version = "7.17.12".split(".").reduce((v, x) => v * 1e5 + +x, 0);
 const versionKey = "@babel/plugin-class-features/version";
 
 function createClassFeaturePlugin({
@@ -47,7 +49,8 @@
   manipulateOptions,
   api = {
     assumption: () => void 0
-  }
+  },
+  inherits
 }) {
   const setPublicClassFields = api.assumption("setPublicClassFields");
   const privateFieldsAsProperties = api.assumption("privateFieldsAsProperties");
@@ -73,6 +76,7 @@
   return {
     name,
     manipulateOptions,
+    inherits,
 
     pre() {
       (0, _features.enableFeature)(this.file, feature, loose);
@@ -85,7 +89,8 @@
     visitor: {
       Class(path, state) {
         if (this.file.get(versionKey) !== version) return;
-        (0, _features.verifyUsedFeatures)(path, this.file);
+        if (!(0, _features.shouldTransform)(path, this.file)) return;
+        if (path.isClassDeclaration()) (0, _typescript.assertFieldTransformed)(path);
         const loose = (0, _features.isLoose)(this.file, feature);
         let constructor;
         const isDecorated = (0, _decorators.hasDecorators)(path.node);
@@ -96,8 +101,6 @@
         const body = path.get("body");
 
         for (const path of body.get("body")) {
-          (0, _features.verifyUsedFeatures)(path, this.file);
-
           if ((path.isClassProperty() || path.isClassMethod()) && path.node.computed) {
             computedPaths.push(path);
           }
@@ -186,7 +189,7 @@
             if (isDecorated) return;
 
             for (const prop of props) {
-              if (prop.node.static) continue;
+              if (_core.types.isStaticBlock != null && _core.types.isStaticBlock(prop.node) || prop.node.static) continue;
               prop.traverse(referenceVisitor, state);
             }
           });
@@ -202,16 +205,6 @@
         if (pureStaticNodes.length > 0) {
           wrappedPath.find(parent => parent.isStatement() || parent.isDeclaration()).insertAfter(pureStaticNodes);
         }
-      },
-
-      PrivateName(path) {
-        if (this.file.get(versionKey) !== version || path.parentPath.isPrivate({
-          key: path.node
-        })) {
-          return;
-        }
-
-        throw path.buildCodeFrameError(`Unknown PrivateName "${path}"`);
       },
 
       ExportDefaultDeclaration(path) {

--
Gitblit v1.8.0