Skip to content

Commit

Permalink
chore(repo): update non-major dependency versions (#468)
Browse files Browse the repository at this point in the history
* chore(repo): update non-major dependency versions

* chore: update deps and get broken lint rules working

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Moon <moonmeister@users.noreply.github.com>
  • Loading branch information
renovate[bot] and moonmeister authored Oct 11, 2024
1 parent e7f1d20 commit 67b7397
Show file tree
Hide file tree
Showing 11 changed files with 5,833 additions and 11,140 deletions.
8 changes: 8 additions & 0 deletions .changeset/lovely-wombats-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"gatsby-plugin-pinterest": patch
"gatsby-source-packagist": patch
"gatsby-plugin-fastify": patch
"gatsby-source-strapi": patch
---

Refactor code for updated linting rules
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"eslint.useFlatConfig": true
}
10 changes: 10 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ module.exports = [
},
rules: {
...typescript.configs.recommended.rules,
"unicorn/import-style": [
"error",
{
styles: {
"node:path": {
named: true,
},
},
},
],
},
},
{
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@
"@babel/eslint-parser": "^7.25.7",
"@babel/preset-react": "^7.25.7",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@hkdobrev/run-if-changed": "^0.3.1",
"@tsconfig/node20": "^20.1.2",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@changesets/cli": "^2.27.9",
"@hkdobrev/run-if-changed": "^0.6.1",
"@tsconfig/node20": "^20.1.4",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.1",
"all-contributors-cli": "^6.26.1",
"chalk": "^5.3.0",
"eslint": "^8.56.0",
"eslint": "^9.12.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-unicorn": "^50.0.1",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-unicorn": "^56.0.0",
"fs-extra": "^11.2.0",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
"renovate": "^37.115.0",
"typescript": "^5.3.3"
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"renovate": "^37.440.7",
"typescript": "^5.6.3"
},
"packageManager": "yarn@4.0.2+sha256.825003a0f561ad09a3b1ac4a3b3ea6207af2796d54f62a9420520915721f5186",
"packageManager": "yarn@4.5.0+sha512.837566d24eec14ec0f5f1411adb544e892b3454255e61fdef8fd05f3429480102806bac7446bc9daff3896b01ae4b62d00096c7e989f1596f2af10b927532f39",
"lint-staged": {
"**/*.{mjs,js,ts,md,json,yml,json5}": "prettier --write",
"packages/**/*.{js,ts}": "eslint --fix"
Expand Down
1 change: 1 addition & 0 deletions packages/gatsby-plugin-fastify/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { hideBin } from "yargs/helpers";
import { gatsbyServer } from "./serve";
import open from "open";

// eslint-disable-next-line @typescript-eslint/no-unused-expressions
yargs(hideBin(process.argv))
.env("GATSBY_SERVER_")
.command(
Expand Down
4 changes: 3 additions & 1 deletion packages/gatsby-plugin-fastify/src/plugins/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export const handleRedirects: FastifyPluginAsync<{
}

if (!alreadyRegisterd.has(cleanFromPath)) {
isCleanedPath && alreadyRegisterd.add(cleanFromPath);
if (isCleanedPath) {
alreadyRegisterd.add(cleanFromPath);
}

fastify.all<{
Params: {
Expand Down
7 changes: 5 additions & 2 deletions packages/gatsby-plugin-fastify/src/utils/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ export function countPaths(paths: ServerSideRoute[]) {
const results = { dsgCount: 0, ssrCount: 0 };

for (const path of paths) {
path.mode === "SSR" && results.ssrCount++;
path.mode === "DSG" && results.dsgCount++;
if (path.mode === "SSR") {
results.ssrCount += 1;
} else if (path.mode === "DSG") {
results.dsgCount += 1;
}
}

return results;
Expand Down
8 changes: 6 additions & 2 deletions packages/gatsby-plugin-pinterest/src/gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ export const onRouteUpdate = (arguments_, pluginOptions = {}) => {
injectedPinterestScript = true;
}

if (!hover && typeof PinUtils !== `undefined` && typeof window.PinUtils.build === `function`) {
window.PinUtils.build();
if (
!hover &&
typeof PinUtils !== `undefined` &&
typeof globalThis.PinUtils.build === `function`
) {
globalThis.PinUtils.build();
}
}
};
2 changes: 1 addition & 1 deletion packages/gatsby-source-packagist/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function createResolvers(
{ actions, createResolvers, createNodeId, reporter, store, cache },
{ githubApi },
) {
global.reporter = reporter;
globalThis.reporter = reporter;
const { createNode } = actions;

const README_DOMAINS = {};
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-source-strapi/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const buildNodesToRemoveMap = (existingNodesMap, endpoints, data) => {
}

accumulator[name] = value.filter((index) => {
return currentNodes.findIndex((k) => k.strapi_id === index.strapi_id) === -1;
return !currentNodes.some((k) => k.strapi_id === index.strapi_id);
});

return accumulator;
Expand All @@ -93,7 +93,7 @@ const getEndpoints = ({ collectionTypes, singleTypes, version = 4 }, schemas) =>
.filter(
({ schema, uid }) =>
!uid.startsWith("admin::") &&
types.findIndex(({ singularName }) => singularName === schema.singularName) !== -1,
types.some(({ singularName }) => singularName === schema.singularName),
)
.map(({ schema: { kind, singularName, pluralName }, uid, plugin }) => {
const options = types.find((config) => config.singularName === singularName);
Expand Down
Loading

0 comments on commit 67b7397

Please sign in to comment.