Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typo in codebase #11846

Merged
merged 1 commit into from Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -115,7 +115,7 @@ jobs:
<<: *test262_workdir
- store_artifacts: *artifact_test262_diff_tap
- run:
name: Output comparision results and report to CircleCI
name: Output comparison results and report to CircleCI
command: |
mkdir -p ~/test-results/test262
cat ~/diff.tap | $(npm bin)/tap-merge | $(npm bin)/tap-mocha-reporter xunit | tee ~/test-results/test262/results.xml
Expand Down
Expand Up @@ -21,7 +21,7 @@ type ReferenceOrigin =
// Given a node and a context, returns a description of where its value comes
// from.
// 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(
node,
scope,
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-compat-data/scripts/build-corejs3-proposals.js
Expand Up @@ -25,10 +25,10 @@ const builtInDefinitionsPath = path.join(
const builtInDefinitions = fs.readFileSync(builtInDefinitionsPath, "utf-8");

for (const feature of finishedProposals) {
const standarizedName = feature.replace("esnext.", "es.");
if (!builtInDefinitions.includes(standarizedName)) {
const standardizedName = feature.replace("esnext.", "es.");
if (!builtInDefinitions.includes(standardizedName)) {
console.log(
`${feature} is now standarized as ${standarizedName}, please add "${standarizedName}" to "${builtInDefinitionsPath}"`
`${feature} is now standarized as ${standardizedName}, please add "${standardizedName}" to "${builtInDefinitionsPath}"`
);
}
}
2 changes: 1 addition & 1 deletion packages/babel-core/src/config/files/import.js
@@ -1,5 +1,5 @@
// @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
// when loading this file.

Expand Down
2 changes: 1 addition & 1 deletion packages/babel-core/src/gensync-utils/async.js
Expand Up @@ -10,7 +10,7 @@ const runGenerator = gensync(function* (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.
export const isAsync = gensync<[], boolean>({
sync: () => false,
Expand Down
Expand Up @@ -12,7 +12,7 @@ export default function rewriteLiveReferences(
const imported = new Map();
const exported = new Map();
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
// happen automatically from the replaceWith above. See #4140 for
// more info.
Expand Down
Expand Up @@ -2,7 +2,7 @@ import * as t from "@babel/types";

export default function splitExportDeclaration(exportDeclaration) {
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
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-parser/src/plugins/flow.js
Expand Up @@ -1077,7 +1077,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>

/* The inexact flag should only be added on ObjectTypeAnnotations that
* 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.
*/
if (allowSpread) {
Expand Down Expand Up @@ -2698,7 +2698,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>

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
// unrecoverable error while Flow didn't.
// If the error is recoverable, we can only re-report it if there is
Expand Down
Expand Up @@ -596,7 +596,7 @@ export default declare((api, opts) => {
exp = t.callExpression(t.cloneNode(helper), [
exp,
// 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]]
...(hadProps ? [t.objectExpression([]), obj] : []),
]);
Expand Down
Expand Up @@ -16,6 +16,6 @@ const obj = new Obj();
expect(() => {
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
}).toThrowError(TypeError)
Expand Up @@ -16,6 +16,6 @@ const obj = new Obj();
expect(() => {
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
}).toThrowError(TypeError)
Expand Up @@ -56,6 +56,6 @@ let Obj = /*#__PURE__*/function (_Base) {

const obj = new Obj();
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
}).toThrowError(TypeError);
Expand Up @@ -19,6 +19,6 @@ const obj = new Obj();
expect(() => {
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
}).toThrowError(TypeError)
4 changes: 2 additions & 2 deletions packages/babel-preset-env/CONTRIBUTING.md
Expand Up @@ -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

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).

Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-env/src/normalize-options.js
Expand Up @@ -33,7 +33,7 @@ const validateTopLevelOptions = (options: Options) => {

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
// will add a module plugin twice.
const modulePlugins = [
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-traverse/src/path/introspection.js
Expand Up @@ -402,7 +402,7 @@ export function _guessExecutionStatusRelativeToDifferentFunctions(
return "unknown";
}

// Prevent infinte loops in recursive functions
// Prevent infinite loops in recursive functions
if (executionOrderCheckedNodes.has(path.node)) continue;
executionOrderCheckedNodes.add(path.node);

Expand Down
Expand Up @@ -4,7 +4,7 @@ import removeTypeDuplicates from "../../modifications/flow/removeTypeDuplicates"

/**
* 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 {
const flattened = removeTypeDuplicates(types);
Expand Down
Expand Up @@ -3,7 +3,7 @@ import removeTypeDuplicates from "../../modifications/typescript/removeTypeDupli

/**
* 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(
typeAnnotations: Array<Object>,
Expand Down