微信小程序已经内置了部分 core-js polyfill,但不全面。参考:
需要手动打包缺失的模块,并导入项目。
参考文档:https://github.com/zloirock/core-js/tree/master/packages/core-js-builder
import builder from 'core-js-builder'| diff --git a/config/install/search_api_solr.solr_field_type.m_text_und_5_2_0.yml b/config/install/search_api_solr.solr_field_type.m_text_und_5_2_0.yml | |
| index f37be9e..0f4cb5a 100644 | |
| --- a/config/install/search_api_solr.solr_field_type.m_text_und_5_2_0.yml | |
| +++ b/config/install/search_api_solr.solr_field_type.m_text_und_5_2_0.yml | |
| @@ -26,7 +26,7 @@ field_type: | |
| - | |
| class: solr.ManagedStopFilterFactory | |
| managed: stopwords | |
| - # ignoreCase: true | |
| + # ignoreCase: 'true' |
| diff --git a/src/GraphQL/Execution/QueryProcessor.php b/src/GraphQL/Execution/QueryProcessor.php | |
| index 941b664..a2a7f27 100644 | |
| --- a/src/GraphQL/Execution/QueryProcessor.php | |
| +++ b/src/GraphQL/Execution/QueryProcessor.php | |
| @@ -100,9 +100,9 @@ class QueryProcessor { | |
| $metadata->addCacheableDependency($container->get('metadata')); | |
| } | |
| - // Prevent caching if this is a mutation query. | |
| + // Prevent caching if this is a mutation query or an error occurs. |
| diff --git a/modules/order/commerce_order.post_update.php b/modules/order/commerce_order.post_update.php | |
| index 26dd36c..7c47d89 100644 | |
| --- a/modules/order/commerce_order.post_update.php | |
| +++ b/modules/order/commerce_order.post_update.php | |
| @@ -7,6 +7,8 @@ | |
| use Drupal\Core\Entity\Entity\EntityFormDisplay; | |
| +use Drupal\Core\Field\BaseFieldDefinition; | |
| + |
| diff --git a/modules/payment/src/Controller/PaymentCheckoutController.php b/modules/payment/src/Controller/PaymentCheckoutController.php | |
| index a60605d..2a9e246 100644 | |
| --- a/modules/payment/src/Controller/PaymentCheckoutController.php | |
| +++ b/modules/payment/src/Controller/PaymentCheckoutController.php | |
| @@ -2,12 +2,14 @@ | |
| namespace Drupal\commerce_payment\Controller; | |
| +use Drupal\commerce\Response\NeedsRedirectException; | |
| use Drupal\commerce_checkout\CheckoutOrderManagerInterface; |
| diff --git a/src/Entity/CommerceContentEntityBase.php b/src/Entity/CommerceContentEntityBase.php | |
| index 026a79c4f..3e62a878e 100644 | |
| --- a/src/Entity/CommerceContentEntityBase.php | |
| +++ b/src/Entity/CommerceContentEntityBase.php | |
| @@ -23,7 +23,7 @@ public function getTranslatedReferencedEntities($field_name) { | |
| */ | |
| public function getTranslatedReferencedEntity($field_name) { | |
| $referenced_entities = $this->getTranslatedReferencedEntities($field_name); | |
| - return reset($referenced_entities); | |
| + return reset($referenced_entities) ?: NULL; |
| 'use strict'; | |
| const mysql = require('mysql2/promise'); | |
| // CREATE TABLE `example` ( | |
| // `id` int unsigned NOT NULL AUTO_INCREMENT, | |
| // `title` varchar(1024) NOT NULL DEFAULT '', | |
| // `created_at` bigint NOT NULL, | |
| // PRIMARY KEY (`id`) | |
| // ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4; |
| 'use strict'; | |
| const mysql = require('mysql2/promise'); | |
| // CREATE TABLE `example` ( | |
| // `id` int unsigned NOT NULL AUTO_INCREMENT, | |
| // `title` varchar(1024) NOT NULL DEFAULT '', | |
| // `created_at` bigint NOT NULL, | |
| // PRIMARY KEY (`id`) | |
| // ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4; |
微信小程序已经内置了部分 core-js polyfill,但不全面。参考:
需要手动打包缺失的模块,并导入项目。
参考文档:https://github.com/zloirock/core-js/tree/master/packages/core-js-builder
import builder from 'core-js-builder'This is a description of the mirroring script at tuna/tunasync-scripts#49 (and other related things)
Links:
| // Usage: node apparmor-docker-default.js | |
| const path = require("node:path"); | |
| const fs = require("node:fs"); | |
| const profileDirectory = "/etc/apparmor.d" | |
| /** | |
| * @typedef ProfileData | |
| * @property {string} name |