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