Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24783,8 +24783,8 @@ function comparePackSizes(basePacks, sourcePacks, threshold) {

// src/checks/replacements.ts
import nativeManifest from "./native-O77SEK3D.json" with { type: "json" };
import microUtilsManifest from "./micro-utilities-74AZJTCK.json" with { type: "json" };
import preferredManifest from "./preferred-UDJHBJAQ.json" with { type: "json" };
import microUtilsManifest from "./micro-utilities-N7NZTMHQ.json" with { type: "json" };
import preferredManifest from "./preferred-S3MZM3ZJ.json" with { type: "json" };
var allReplacements = [
...nativeManifest.moduleReplacements,
...microUtilsManifest.moduleReplacements,
Expand Down Expand Up @@ -25180,7 +25180,7 @@ async function run() {
const workspacePath = join2(baseWorkspace, workDir);
core7.info(`Workspace path is ${workspacePath}`);
const baseRef = getBaseRef();
const currentRef = github2.context.sha;
const currentRef = github2.context.payload.pull_reuqest?.head.sha ?? github2.context.sha;
const lockfileFilename = detectLockfile(workspacePath);
core7.info(`Detected lockfile ${lockfileFilename}`);
const token = core7.getInput("github-token", { required: true });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
{
"moduleReplacements": [
{
"type": "simple",
"moduleName": "arr-diff",
"replacement": "Use a.filter((item) => !b.includes(item))",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "array-last",
"replacement": "Use arr.at(-1) or arr[arr.length - 1]",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "array-union",
"replacement": "Use [...new Set([...a, ...b])]",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "array-uniq",
"replacement": "Use [...new Set(arr)]",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "array-unique",
"replacement": "Use [...new Set(arr)]",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "arrify",
"replacement": "Use (v == null ? [] : Array.isArray(v) ? v : [v])",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "call-bind",
Expand All @@ -24,6 +60,18 @@
"replacement": "Use Object.defineProperty(target, Symbol.toStringTag, { value, configurable: true })",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "filter-obj",
"replacement": "Use Object.fromEntries(Object.entries(obj).filter(fn))",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "has-flag",
"replacement": "Use process.argv.includes('--flag')",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "is-array-buffer",
Expand All @@ -36,6 +84,12 @@
"replacement": "Use Object.prototype.toString.call(v) === \"[object Boolean]\"",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "is-ci",
"replacement": "Use Boolean(process.env.CI)",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "is-date-object",
Expand All @@ -48,6 +102,12 @@
"replacement": "Use (n % 2) === 0",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "is-finite",
"replacement": "Use Number.isFinite(v)",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "is-negative",
Expand Down Expand Up @@ -126,11 +186,47 @@
"replacement": "Use process.platform === \"win32\"",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "kind-of",
"replacement": "Use typeof v, or Object.prototype.toString.call(v) to get the internal [[Class]]",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "lower-case",
"replacement": "Use str.toLocaleLowerCase() or str.toLowerCase()",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "repeat-string",
"replacement": "Use str.repeat(n)",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "slash",
"replacement": "Use path.startsWith('\\\\?\\') ? path : path.replace(/\\/g, '/')",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "split-lines",
"replacement": "Use str.split(/\\r?\\n/)",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "uniq",
"replacement": "Use [...new Set(arr)]",
"category": "micro-utilities"
},
{
"type": "simple",
"moduleName": "upper-case",
"replacement": "Use str.toLocaleUpperCase() or str.toUpperCase()",
"category": "micro-utilities"
}
]
}
Loading