parent
8dacf85859
commit
c702895256
20
Makefile
20
Makefile
@ -196,17 +196,15 @@ prepublish:
|
||||
IS_PUBLISH=true $(MAKE) test
|
||||
|
||||
new-version-checklist:
|
||||
@echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
@echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
@echo "!!!!!! !!!!!!"
|
||||
@echo "!!!!!! Update classStaticPrivateFieldDestructureSet !!!!!!"
|
||||
@echo "!!!!!! helper version in !!!!!!"
|
||||
@echo "!!!!!! packages/babel-helpers/src/helpers.js !!!!!!"
|
||||
@echo "!!!!!! packages/babel-helper-create-class-features-plugin/src/fields.js"
|
||||
@echo "!!!!!! !!!!!!"
|
||||
@echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
@echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
@exit 1
|
||||
# @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
# @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
# @echo "!!!!!! !!!!!!"
|
||||
# @echo "!!!!!! Write any message that should !!!!!!"
|
||||
# @echo "!!!!!! block the release here !!!!!!"
|
||||
# @echo "!!!!!! !!!!!!"
|
||||
# @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
# @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
# @exit 1
|
||||
|
||||
new-version:
|
||||
$(MAKE) new-version-checklist
|
||||
|
||||
@ -323,12 +323,12 @@ const privateNameHandlerSpec = {
|
||||
const { id, static: isStatic } = privateNamesMap.get(name);
|
||||
if (isStatic) {
|
||||
try {
|
||||
// classStaticPrivateFieldDestructureSet was introduced in 7.99.0
|
||||
// classStaticPrivateFieldDestructureSet was introduced in 7.13.10
|
||||
// eslint-disable-next-line no-var
|
||||
var helper = file.addHelper("classStaticPrivateFieldDestructureSet");
|
||||
} catch {
|
||||
throw new Error(
|
||||
"Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.99.0, \n" +
|
||||
"Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \n" +
|
||||
"please update @babel/helpers to the latest version.",
|
||||
);
|
||||
}
|
||||
|
||||
@ -1326,7 +1326,7 @@ helpers.classPrivateFieldDestructureSet = helper("7.4.4")`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classExtractFieldDescriptor = helper("7.99.0")`
|
||||
helpers.classExtractFieldDescriptor = helper("7.13.10")`
|
||||
export default function _classExtractFieldDescriptor(receiver, privateMap, action) {
|
||||
if (!privateMap.has(receiver)) {
|
||||
throw new TypeError("attempted to " + action + " private field on non-instance");
|
||||
@ -1372,7 +1372,7 @@ helpers.classStaticPrivateMethodSet = helper("7.3.2")`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classApplyDescriptorGet = helper("7.99.0")`
|
||||
helpers.classApplyDescriptorGet = helper("7.13.10")`
|
||||
export default function _classApplyDescriptorGet(receiver, descriptor) {
|
||||
if (descriptor.get) {
|
||||
return descriptor.get.call(receiver);
|
||||
@ -1381,7 +1381,7 @@ helpers.classApplyDescriptorGet = helper("7.99.0")`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classApplyDescriptorSet = helper("7.99.0")`
|
||||
helpers.classApplyDescriptorSet = helper("7.13.10")`
|
||||
export default function _classApplyDescriptorSet(receiver, descriptor, value) {
|
||||
if (descriptor.set) {
|
||||
descriptor.set.call(receiver, value);
|
||||
@ -1397,7 +1397,7 @@ helpers.classApplyDescriptorSet = helper("7.99.0")`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classApplyDescriptorDestructureSet = helper("7.99.0")`
|
||||
helpers.classApplyDescriptorDestructureSet = helper("7.13.10")`
|
||||
export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {
|
||||
if (descriptor.set) {
|
||||
if (!("__destrObj" in descriptor)) {
|
||||
@ -1421,7 +1421,7 @@ helpers.classApplyDescriptorDestructureSet = helper("7.99.0")`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classStaticPrivateFieldDestructureSet = helper("7.99.0")`
|
||||
helpers.classStaticPrivateFieldDestructureSet = helper("7.13.10")`
|
||||
import classApplyDescriptorDestructureSet from "classApplyDescriptorDestructureSet";
|
||||
import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
|
||||
import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
|
||||
@ -1432,7 +1432,7 @@ helpers.classStaticPrivateFieldDestructureSet = helper("7.99.0")`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classCheckPrivateStaticAccess = helper("7.99.0")`
|
||||
helpers.classCheckPrivateStaticAccess = helper("7.13.10")`
|
||||
export default function _classCheckPrivateStaticAccess(receiver, classConstructor) {
|
||||
if (receiver !== classConstructor) {
|
||||
throw new TypeError("Private static access of wrong provenance");
|
||||
@ -1440,7 +1440,7 @@ helpers.classCheckPrivateStaticAccess = helper("7.99.0")`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classCheckPrivateStaticFieldDescriptor = helper("7.99.0")`
|
||||
helpers.classCheckPrivateStaticFieldDescriptor = helper("7.13.10")`
|
||||
export default function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
|
||||
if (descriptor === undefined) {
|
||||
throw new TypeError("attempted to " + action + " private static field before its declaration");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user