微信小程序已经内置了部分 core-js polyfill,但不全面。参考:
需要手动打包缺失的模块,并导入项目。
参考文档:https://github.com/zloirock/core-js/tree/master/packages/core-js-builder
import builder from 'core-js-builder'| // 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 |
微信小程序已经内置了部分 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:
| '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; |
| 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; |
| diff --git a/modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php b/modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php | |
| index 1479897..5e35b82 100644 | |
| --- a/modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php | |
| +++ b/modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php | |
| @@ -27,7 +27,8 @@ use Youshido\GraphQL\Execution\ResolveInfo; | |
| * "limit" = { | |
| * "type" = "Int", | |
| * "default" = 10 | |
| - * } | |
| + * }, |
| 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/modules/graphql_core/src/Plugin/Deriver/Fields/EntityFieldDeriver.php b/modules/graphql_core/src/Plugin/Deriver/Fields/EntityFieldDeriver.php | |
| index def5716..ea5e931 100644 | |
| --- a/modules/graphql_core/src/Plugin/Deriver/Fields/EntityFieldDeriver.php | |
| +++ b/modules/graphql_core/src/Plugin/Deriver/Fields/EntityFieldDeriver.php | |
| @@ -29,6 +29,10 @@ class EntityFieldDeriver extends EntityFieldDeriverWithTypeMapping { | |
| return []; | |
| } | |
| + if ($fieldDefinition->getType() === 'map') { | |
| + return []; |
| diff --git a/flag.install b/flag.install | |
| index ec4794b..42ba3ba 100644 | |
| --- a/flag.install | |
| +++ b/flag.install | |
| @@ -30,9 +30,10 @@ function flag_schema() { | |
| ], | |
| 'entity_id' => [ | |
| 'description' => 'The unique ID of the flagged entity, for example the uid, cid, or nid.', | |
| - 'type' => 'varchar_ascii', | |
| - 'length' => ConfigEntityStorage::MAX_ID_LENGTH, |