Skip to content

Commit 2c7e9f7

Browse files
authored
Fixing a few small typos (#14466)
1 parent 70fabe9 commit 2c7e9f7

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

packages/babel-core/src/config/files/plugins.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async function tryImportMetaResolve(
141141
}
142142
}
143143

144-
function resolveStandardizedNameForRequrie(
144+
function resolveStandardizedNameForRequire(
145145
type: "plugin" | "preset",
146146
name: string,
147147
dirname: string,
@@ -174,18 +174,18 @@ const resolveStandardizedName: Gensync<
174174
(type: "plugin" | "preset", name: string, dirname?: string) => string
175175
> = gensync({
176176
sync(type, name, dirname = process.cwd()) {
177-
return resolveStandardizedNameForRequrie(type, name, dirname);
177+
return resolveStandardizedNameForRequire(type, name, dirname);
178178
},
179179
async async(type, name, dirname = process.cwd()) {
180180
if (!supportsESM) {
181-
return resolveStandardizedNameForRequrie(type, name, dirname);
181+
return resolveStandardizedNameForRequire(type, name, dirname);
182182
}
183183

184184
try {
185185
return await resolveStandardizedNameForImport(type, name, dirname);
186186
} catch (e) {
187187
try {
188-
return resolveStandardizedNameForRequrie(type, name, dirname);
188+
return resolveStandardizedNameForRequire(type, name, dirname);
189189
} catch (e2) {
190190
if (e.type === "MODULE_NOT_FOUND") throw e;
191191
if (e2.type === "MODULE_NOT_FOUND") throw e2;
@@ -218,7 +218,7 @@ function* requireModule(type: string, name: string): Handler<unknown> {
218218
name,
219219
`You appear to be using a native ECMAScript module ${type}, ` +
220220
"which is only supported when running Babel asynchronously.",
221-
// For backward compatiblity, we need to support malformed presets
221+
// For backward compatibility, we need to support malformed presets
222222
// defined as separate named exports rather than a single default
223223
// export.
224224
// See packages/babel-core/test/fixtures/option-manager/presets/es2015_named.js

packages/babel-plugin-transform-runtime/scripts/build-dist.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ function writeHelpers(runtimeName, { corejs } = {}) {
153153
// Node.js versions >=13.0.0, <13.7.0 support the `exports` field but
154154
// not conditional exports (`require`/`node`/`default`)
155155
// We can specify exports with an array of fallbacks:
156-
// - Node.js >=13.7.0 and bundlers will succesfully load the first
156+
// - Node.js >=13.7.0 and bundlers will successfully load the first
157157
// array entry:
158158
// * Node.js will always load the CJS file
159159
// * Modern tools when using "import" will load the ESM file
160-
// * Everything else (old tools, or requrie() in tools) will
160+
// * Everything else (old tools, or require() in tools) will
161161
// load the CJS file
162162
// - Node.js 13.2-13.7 will ignore the "node" and "import" conditions,
163163
// will fallback to "default" and load the CJS file

0 commit comments

Comments
 (0)