chore: fix typo in codebase (#11846)
This commit is contained in:
parent
02f30af59c
commit
8f191ead92
@ -115,7 +115,7 @@ jobs:
|
|||||||
<<: *test262_workdir
|
<<: *test262_workdir
|
||||||
- store_artifacts: *artifact_test262_diff_tap
|
- store_artifacts: *artifact_test262_diff_tap
|
||||||
- run:
|
- run:
|
||||||
name: Output comparision results and report to CircleCI
|
name: Output comparison results and report to CircleCI
|
||||||
command: |
|
command: |
|
||||||
mkdir -p ~/test-results/test262
|
mkdir -p ~/test-results/test262
|
||||||
cat ~/diff.tap | $(npm bin)/tap-merge | $(npm bin)/tap-mocha-reporter xunit | tee ~/test-results/test262/results.xml
|
cat ~/diff.tap | $(npm bin)/tap-merge | $(npm bin)/tap-mocha-reporter xunit | tee ~/test-results/test262/results.xml
|
||||||
|
|||||||
@ -21,7 +21,7 @@ type ReferenceOrigin =
|
|||||||
// Given a node and a context, returns a description of where its value comes
|
// Given a node and a context, returns a description of where its value comes
|
||||||
// from.
|
// from.
|
||||||
// It resolves imports, parameters of exported functions and property accesses.
|
// It resolves imports, parameters of exported functions and property accesses.
|
||||||
// See the ReferenceOrigin type for more informations.
|
// See the ReferenceOrigin type for more information.
|
||||||
export default function getReferenceOrigin(
|
export default function getReferenceOrigin(
|
||||||
node,
|
node,
|
||||||
scope,
|
scope,
|
||||||
|
|||||||
@ -25,10 +25,10 @@ const builtInDefinitionsPath = path.join(
|
|||||||
const builtInDefinitions = fs.readFileSync(builtInDefinitionsPath, "utf-8");
|
const builtInDefinitions = fs.readFileSync(builtInDefinitionsPath, "utf-8");
|
||||||
|
|
||||||
for (const feature of finishedProposals) {
|
for (const feature of finishedProposals) {
|
||||||
const standarizedName = feature.replace("esnext.", "es.");
|
const standardizedName = feature.replace("esnext.", "es.");
|
||||||
if (!builtInDefinitions.includes(standarizedName)) {
|
if (!builtInDefinitions.includes(standardizedName)) {
|
||||||
console.log(
|
console.log(
|
||||||
`${feature} is now standarized as ${standarizedName}, please add "${standarizedName}" to "${builtInDefinitionsPath}"`
|
`${feature} is now standarized as ${standardizedName}, please add "${standardizedName}" to "${builtInDefinitionsPath}"`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// @flow
|
// @flow
|
||||||
// We keep this in a seprate file so that in older node versions, where
|
// We keep this in a separate file so that in older node versions, where
|
||||||
// import() isn't supported, we can try/catch around the require() call
|
// import() isn't supported, we can try/catch around the require() call
|
||||||
// when loading this file.
|
// when loading this file.
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ const runGenerator = gensync(function* (item) {
|
|||||||
return yield* item;
|
return yield* item;
|
||||||
});
|
});
|
||||||
|
|
||||||
// This Gensync returns true if the current execution contect is
|
// This Gensync returns true if the current execution context is
|
||||||
// asynchronous, otherwise it returns false.
|
// asynchronous, otherwise it returns false.
|
||||||
export const isAsync = gensync<[], boolean>({
|
export const isAsync = gensync<[], boolean>({
|
||||||
sync: () => false,
|
sync: () => false,
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export default function rewriteLiveReferences(
|
|||||||
const imported = new Map();
|
const imported = new Map();
|
||||||
const exported = new Map();
|
const exported = new Map();
|
||||||
const requeueInParent = path => {
|
const requeueInParent = path => {
|
||||||
// Manualy re-queue `exports.default =` expressions so that the ES3
|
// Manually re-queue `exports.default =` expressions so that the ES3
|
||||||
// transform has an opportunity to convert them. Ideally this would
|
// transform has an opportunity to convert them. Ideally this would
|
||||||
// happen automatically from the replaceWith above. See #4140 for
|
// happen automatically from the replaceWith above. See #4140 for
|
||||||
// more info.
|
// more info.
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import * as t from "@babel/types";
|
|||||||
|
|
||||||
export default function splitExportDeclaration(exportDeclaration) {
|
export default function splitExportDeclaration(exportDeclaration) {
|
||||||
if (!exportDeclaration.isExportDeclaration()) {
|
if (!exportDeclaration.isExportDeclaration()) {
|
||||||
throw new Error("Only export declarations can be splitted.");
|
throw new Error("Only export declarations can be split.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// build specifiers that point back to this export declaration
|
// build specifiers that point back to this export declaration
|
||||||
|
|||||||
@ -1077,7 +1077,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
|||||||
|
|
||||||
/* The inexact flag should only be added on ObjectTypeAnnotations that
|
/* The inexact flag should only be added on ObjectTypeAnnotations that
|
||||||
* are not the body of an interface, declare interface, or declare class.
|
* are not the body of an interface, declare interface, or declare class.
|
||||||
* Since spreads are only allowed in objec types, checking that is
|
* Since spreads are only allowed in object types, checking that is
|
||||||
* sufficient here.
|
* sufficient here.
|
||||||
*/
|
*/
|
||||||
if (allowSpread) {
|
if (allowSpread) {
|
||||||
@ -2698,7 +2698,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
|||||||
|
|
||||||
if (!arrow.error && arrowExpression) return arrowExpression;
|
if (!arrow.error && arrowExpression) return arrowExpression;
|
||||||
|
|
||||||
// If we are here, both JSX and Flow parsing attemps failed.
|
// If we are here, both JSX and Flow parsing attempts failed.
|
||||||
// Give the precedence to the JSX error, except if JSX had an
|
// Give the precedence to the JSX error, except if JSX had an
|
||||||
// unrecoverable error while Flow didn't.
|
// unrecoverable error while Flow didn't.
|
||||||
// If the error is recoverable, we can only re-report it if there is
|
// If the error is recoverable, we can only re-report it if there is
|
||||||
|
|||||||
@ -596,7 +596,7 @@ export default declare((api, opts) => {
|
|||||||
exp = t.callExpression(t.cloneNode(helper), [
|
exp = t.callExpression(t.cloneNode(helper), [
|
||||||
exp,
|
exp,
|
||||||
// If we have static props, we need to insert an empty object
|
// If we have static props, we need to insert an empty object
|
||||||
// becuase the odd arguments are copied with [[Get]], not
|
// because the odd arguments are copied with [[Get]], not
|
||||||
// [[GetOwnProperty]]
|
// [[GetOwnProperty]]
|
||||||
...(hadProps ? [t.objectExpression([]), obj] : []),
|
...(hadProps ? [t.objectExpression([]), obj] : []),
|
||||||
]);
|
]);
|
||||||
|
|||||||
@ -16,6 +16,6 @@ const obj = new Obj();
|
|||||||
expect(() => {
|
expect(() => {
|
||||||
obj.call();
|
obj.call();
|
||||||
|
|
||||||
// Asser that this throws, but that it's not
|
// Assert that this throws, but that it's not
|
||||||
// Obj.p.test's error that is thrown
|
// Obj.p.test's error that is thrown
|
||||||
}).toThrowError(TypeError)
|
}).toThrowError(TypeError)
|
||||||
|
|||||||
@ -16,6 +16,6 @@ const obj = new Obj();
|
|||||||
expect(() => {
|
expect(() => {
|
||||||
obj.call();
|
obj.call();
|
||||||
|
|
||||||
// Asser that this throws, but that it's not
|
// Assert that this throws, but that it's not
|
||||||
// Obj.p.test's error that is thrown
|
// Obj.p.test's error that is thrown
|
||||||
}).toThrowError(TypeError)
|
}).toThrowError(TypeError)
|
||||||
|
|||||||
@ -56,6 +56,6 @@ let Obj = /*#__PURE__*/function (_Base) {
|
|||||||
|
|
||||||
const obj = new Obj();
|
const obj = new Obj();
|
||||||
expect(() => {
|
expect(() => {
|
||||||
obj.call(); // Asser that this throws, but that it's not
|
obj.call(); // Assert that this throws, but that it's not
|
||||||
// Obj.p.test's error that is thrown
|
// Obj.p.test's error that is thrown
|
||||||
}).toThrowError(TypeError);
|
}).toThrowError(TypeError);
|
||||||
|
|||||||
@ -19,6 +19,6 @@ const obj = new Obj();
|
|||||||
expect(() => {
|
expect(() => {
|
||||||
obj.call();
|
obj.call();
|
||||||
|
|
||||||
// Asser that this throws, but that it's not
|
// Assert that this throws, but that it's not
|
||||||
// a gobbledygook error that is thrown
|
// a gobbledygook error that is thrown
|
||||||
}).toThrowError(TypeError)
|
}).toThrowError(TypeError)
|
||||||
|
|||||||
@ -51,13 +51,13 @@ const es = {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
If you wan to transform a new built-in by `useBuiltIns: 'usage'`, add mapping to related `core-js` modules to [this file](https://github.com/babel/babel/blob/main/packages/babel-preset-env/polyfills/corejs2/built-in-definitions.js).
|
If you want to transform a new built-in by `useBuiltIns: 'usage'`, add mapping to related `core-js` modules to [this file](https://github.com/babel/babel/blob/main/packages/babel-preset-env/polyfills/corejs2/built-in-definitions.js).
|
||||||
|
|
||||||
### Update data for `core-js@3` polyfilling
|
### Update data for `core-js@3` polyfilling
|
||||||
|
|
||||||
Just update the version of [`core-js-compat`](https://github.com/zloirock/core-js/tree/main/packages/core-js-compat) in dependencies.
|
Just update the version of [`core-js-compat`](https://github.com/zloirock/core-js/tree/main/packages/core-js-compat) in dependencies.
|
||||||
|
|
||||||
If you wan to transform a new built-in by `useBuiltIns: 'usage'`, add mapping to related [`core-js`](https://github.com/zloirock/core-js/tree/main/packages/core-js/modules) modules to [this file](https://github.com/babel/babel/blob/main/packages/babel-preset-env/polyfills/corejs3/built-in-definitions.js).
|
If you want to transform a new built-in by `useBuiltIns: 'usage'`, add mapping to related [`core-js`](https://github.com/zloirock/core-js/tree/main/packages/core-js/modules) modules to [this file](https://github.com/babel/babel/blob/main/packages/babel-preset-env/polyfills/corejs3/built-in-definitions.js).
|
||||||
|
|
||||||
If you want to mark a new proposal as shipped, add it to [this list](https://github.com/babel/babel/blob/main/packages/babel-preset-env/polyfills/corejs3/shipped-proposals.js).
|
If you want to mark a new proposal as shipped, add it to [this list](https://github.com/babel/babel/blob/main/packages/babel-preset-env/polyfills/corejs3/shipped-proposals.js).
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ const validateTopLevelOptions = (options: Options) => {
|
|||||||
|
|
||||||
const allPluginsList = Object.keys(pluginsList);
|
const allPluginsList = Object.keys(pluginsList);
|
||||||
|
|
||||||
// NOTE: Since module plugins are handled seperatly compared to other plugins (via the "modules" option) it
|
// NOTE: Since module plugins are handled separately compared to other plugins (via the "modules" option) it
|
||||||
// should only be possible to exclude and not include module plugins, otherwise it's possible that preset-env
|
// should only be possible to exclude and not include module plugins, otherwise it's possible that preset-env
|
||||||
// will add a module plugin twice.
|
// will add a module plugin twice.
|
||||||
const modulePlugins = [
|
const modulePlugins = [
|
||||||
|
|||||||
@ -402,7 +402,7 @@ export function _guessExecutionStatusRelativeToDifferentFunctions(
|
|||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent infinte loops in recursive functions
|
// Prevent infinite loops in recursive functions
|
||||||
if (executionOrderCheckedNodes.has(path.node)) continue;
|
if (executionOrderCheckedNodes.has(path.node)) continue;
|
||||||
executionOrderCheckedNodes.add(path.node);
|
executionOrderCheckedNodes.add(path.node);
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import removeTypeDuplicates from "../../modifications/flow/removeTypeDuplicates"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes an array of `types` and flattens them, removing duplicates and
|
* Takes an array of `types` and flattens them, removing duplicates and
|
||||||
* returns a `UnionTypeAnnotation` node containg them.
|
* returns a `UnionTypeAnnotation` node containing them.
|
||||||
*/
|
*/
|
||||||
export default function createFlowUnionType(types: Array<Object>): Object {
|
export default function createFlowUnionType(types: Array<Object>): Object {
|
||||||
const flattened = removeTypeDuplicates(types);
|
const flattened = removeTypeDuplicates(types);
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import removeTypeDuplicates from "../../modifications/typescript/removeTypeDupli
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes an array of `types` and flattens them, removing duplicates and
|
* Takes an array of `types` and flattens them, removing duplicates and
|
||||||
* returns a `UnionTypeAnnotation` node containg them.
|
* returns a `UnionTypeAnnotation` node containing them.
|
||||||
*/
|
*/
|
||||||
export default function createTSUnionType(
|
export default function createTSUnionType(
|
||||||
typeAnnotations: Array<Object>,
|
typeAnnotations: Array<Object>,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user