correct spelling mistake, update identifer to identifier
This commit is contained in:
parent
efda972ffd
commit
ff8c37e887
|
@ -558,7 +558,7 @@ class ChunkGraph {
|
|||
|
||||
/**
|
||||
* @param {Chunk} chunk the chunk
|
||||
* @returns {Module[]} root modules of the chunks (ordered by identifer)
|
||||
* @returns {Module[]} root modules of the chunks (ordered by identifier)
|
||||
*/
|
||||
getChunkRootModules(chunk) {
|
||||
const cgc = this._getChunkGraphChunk(chunk);
|
||||
|
|
|
@ -129,7 +129,7 @@ class Template {
|
|||
* @param {number} n number to convert to ident
|
||||
* @returns {string} returns single character ident
|
||||
*/
|
||||
static numberToIdentifer(n) {
|
||||
static numberToIdentifier(n) {
|
||||
// lower case
|
||||
if (n < DELTA_A_TO_Z) {
|
||||
return String.fromCharCode(START_LOWERCASE_ALPHABET_CODE + n);
|
||||
|
@ -144,8 +144,8 @@ class Template {
|
|||
|
||||
// use multiple letters
|
||||
return (
|
||||
Template.numberToIdentifer(n % (2 * DELTA_A_TO_Z)) +
|
||||
Template.numberToIdentifer(Math.floor(n / (2 * DELTA_A_TO_Z)))
|
||||
Template.numberToIdentifier(n % (2 * DELTA_A_TO_Z)) +
|
||||
Template.numberToIdentifier(Math.floor(n / (2 * DELTA_A_TO_Z)))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,21 +62,21 @@ module.exports = class HarmonyDetectionParserPlugin {
|
|||
};
|
||||
|
||||
const nonHarmonyIdentifiers = ["define", "exports"];
|
||||
for (const identifer of nonHarmonyIdentifiers) {
|
||||
for (const identifier of nonHarmonyIdentifiers) {
|
||||
parser.hooks.evaluateTypeof
|
||||
.for(identifer)
|
||||
.for(identifier)
|
||||
.tap("HarmonyDetectionParserPlugin", nullInHarmony);
|
||||
parser.hooks.typeof
|
||||
.for(identifer)
|
||||
.for(identifier)
|
||||
.tap("HarmonyDetectionParserPlugin", skipInHarmony);
|
||||
parser.hooks.evaluate
|
||||
.for(identifer)
|
||||
.for(identifier)
|
||||
.tap("HarmonyDetectionParserPlugin", nullInHarmony);
|
||||
parser.hooks.expression
|
||||
.for(identifer)
|
||||
.for(identifier)
|
||||
.tap("HarmonyDetectionParserPlugin", skipInHarmony);
|
||||
parser.hooks.call
|
||||
.for(identifer)
|
||||
.for(identifier)
|
||||
.tap("HarmonyDetectionParserPlugin", skipInHarmony);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { numberToIdentifer } = require("../Template");
|
||||
const { numberToIdentifier } = require("../Template");
|
||||
const { assignDeterministicIds } = require("../ids/IdHelpers");
|
||||
const {
|
||||
concatComparators,
|
||||
|
@ -65,7 +65,7 @@ class MangleExportsPlugin {
|
|||
e => e.name,
|
||||
comparator,
|
||||
(e, id) => {
|
||||
const name = numberToIdentifer(id);
|
||||
const name = numberToIdentifier(id);
|
||||
const size = usedNames.size;
|
||||
usedNames.add(name);
|
||||
if (size === usedNames.size) return false;
|
||||
|
|
|
@ -46,7 +46,7 @@ const getUsedDependencies = (moduleGraph, module, mangle) => {
|
|||
if (mangle) {
|
||||
array.push({
|
||||
dependency: dep,
|
||||
name: Template.numberToIdentifer(importIndex++),
|
||||
name: Template.numberToIdentifier(importIndex++),
|
||||
module: MANGLED_MODULE
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -541,7 +541,7 @@ rules:
|
|||
last_action_age: 13w # three months
|
||||
actions:
|
||||
comment:
|
||||
identifer: inactive-warning
|
||||
identifier: inactive-warning
|
||||
message: |-
|
||||
**This issue had no activity for at least three months.**
|
||||
|
||||
|
@ -565,7 +565,7 @@ rules:
|
|||
actions:
|
||||
close: true
|
||||
comment:
|
||||
identifer: inactive-close
|
||||
identifier: inactive-close
|
||||
message: |-
|
||||
Issue was closed because of inactivity.
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
"description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Custom function generating the identifer",
|
||||
"description": "Custom function generating the identifier",
|
||||
"instanceof": "Function",
|
||||
"tsType": "Function"
|
||||
},
|
||||
|
@ -108,7 +108,7 @@
|
|||
"description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Custom function generating the identifer",
|
||||
"description": "Custom function generating the identifier",
|
||||
"instanceof": "Function",
|
||||
"tsType": "Function"
|
||||
},
|
||||
|
|
|
@ -10,7 +10,7 @@ describe("Template", () => {
|
|||
const items = [];
|
||||
let item;
|
||||
for (let i = 0; i < 80; i += 1) {
|
||||
item = Template.numberToIdentifer(i);
|
||||
item = Template.numberToIdentifier(i);
|
||||
expect(item).not.toBe("");
|
||||
expect(items).not.toContain(item);
|
||||
items.push(item);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
const numberHash = require("../lib/util/numberHash");
|
||||
const { numberToIdentifer } = require("../lib/Template");
|
||||
const { numberToIdentifier } = require("../lib/Template");
|
||||
|
||||
describe("numberHash", () => {
|
||||
for (const n of [10, 100, 1000, 10000]) {
|
||||
it("should eventually fill nearly the complete range up to n", () => {
|
||||
const set = new Set();
|
||||
for (let i = 0; i < n * 200; i++) {
|
||||
set.add(numberHash(numberToIdentifer(i), n));
|
||||
set.add(numberHash(numberToIdentifier(i), n));
|
||||
if (set.size >= n - 1) break;
|
||||
}
|
||||
expect(set.size).toBeGreaterThanOrEqual(n - 1);
|
||||
|
|
Loading…
Reference in New Issue