gatsby-page-utils
Advanced tools
Comparing version 3.9.0 to 3.10.0-alpha-adapters.130
@@ -6,2 +6,35 @@ # Changelog: `gatsby-page-utils` | ||
## [3.11.0](https://github.com/gatsbyjs/gatsby/commits/gatsby-page-utils@3.11.0/packages/gatsby-page-utils) (2023-06-15) | ||
[🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v5.11) | ||
#### Bug Fixes | ||
- update typescript [#38133](https://github.com/gatsbyjs/gatsby/issues/38133) ([aa7a078](https://github.com/gatsbyjs/gatsby/commit/aa7a078383ca5a549743be3269e9bde44655a185)) | ||
#### Chores | ||
- update dependency rimraf to ^5.0.1 for gatsby-page-utils [#38143](https://github.com/gatsbyjs/gatsby/issues/38143) ([5eaf750](https://github.com/gatsbyjs/gatsby/commit/5eaf7508ca6c0949571776dd5b9788c5f21d9e14)) | ||
## [3.10.0](https://github.com/gatsbyjs/gatsby/commits/gatsby-page-utils@3.10.0/packages/gatsby-page-utils) (2023-05-16) | ||
[🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v5.10) | ||
#### Chores | ||
- update dependency rimraf to v5 for gatsby-page-utils [#38039](https://github.com/gatsbyjs/gatsby/issues/38039) ([ccecd9d](https://github.com/gatsbyjs/gatsby/commit/ccecd9ddfadeb75e30ad95c42096aedac19fe7d8)) | ||
## [3.9.0](https://github.com/gatsbyjs/gatsby/commits/gatsby-page-utils@3.9.0/packages/gatsby-page-utils) (2023-04-18) | ||
[🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v5.9) | ||
#### Bug Fixes | ||
- update typescript to v5 (major) [#37906](https://github.com/gatsbyjs/gatsby/issues/37906) ([3859ba6](https://github.com/gatsbyjs/gatsby/commit/3859ba6ce629e658525f858a8799b08c34c3eda5)) | ||
#### Chores | ||
- update typescript [#37848](https://github.com/gatsbyjs/gatsby/issues/37848) ([9f92796](https://github.com/gatsbyjs/gatsby/commit/9f92796070b0e73fa92089af93de376c9be9021e)) | ||
- update dependency rimraf to v4 for gatsby-page-utils [#37898](https://github.com/gatsbyjs/gatsby/issues/37898) ([644cb73](https://github.com/gatsbyjs/gatsby/commit/644cb735354709155140e668d35fea92a9cf9ddf)) | ||
## [3.8.0](https://github.com/gatsbyjs/gatsby/commits/gatsby-page-utils@3.8.0/packages/gatsby-page-utils) (2023-03-21) | ||
@@ -8,0 +41,0 @@ |
@@ -5,15 +5,20 @@ "use strict"; | ||
exports.applyTrailingSlashOption = void 0; | ||
const endsWithSuffixes = (suffixes, input) => { | ||
for (const suffix of suffixes) { | ||
if (input.endsWith(suffix)) return true; | ||
} | ||
return false; | ||
}; | ||
const suffixes = [`.html`, `.json`, `.js`, `.map`, `.txt`, `.xml`, `.pdf`]; | ||
const applyTrailingSlashOption = (input, option = `always`) => { | ||
const hasHtmlSuffix = input.endsWith(`.html`); | ||
const hasXmlSuffix = input.endsWith(`.xml`); | ||
const hasPdfSuffix = input.endsWith(`.pdf`); | ||
if (input === `/`) return input; | ||
if (hasHtmlSuffix || hasXmlSuffix || hasPdfSuffix) { | ||
option = `never`; | ||
const hasTrailingSlash = input.endsWith(`/`); | ||
if (endsWithSuffixes(suffixes, input)) { | ||
return input; | ||
} | ||
if (option === `always`) { | ||
return input.endsWith(`/`) ? input : `${input}/`; | ||
return hasTrailingSlash ? input : `${input}/`; | ||
} | ||
if (option === `never`) { | ||
return input.endsWith(`/`) ? input.slice(0, -1) : input; | ||
return hasTrailingSlash ? input.slice(0, -1) : input; | ||
} | ||
@@ -20,0 +25,0 @@ return input; |
{ | ||
"name": "gatsby-page-utils", | ||
"version": "3.9.0", | ||
"version": "3.10.0-alpha-adapters.130+81780af779", | ||
"description": "Gatsby library that helps creating pages", | ||
@@ -33,3 +33,3 @@ "main": "dist/index.js", | ||
"fs-exists-cached": "^1.0.0", | ||
"gatsby-core-utils": "^4.9.0", | ||
"gatsby-core-utils": "4.12.0-next.0", | ||
"glob": "^7.2.3", | ||
@@ -43,6 +43,6 @@ "lodash": "^4.17.21", | ||
"@types/micromatch": "^4.0.2", | ||
"babel-preset-gatsby-package": "^3.9.0", | ||
"babel-preset-gatsby-package": "3.12.0-next.0", | ||
"cross-env": "^7.0.3", | ||
"rimraf": "^4.4.1", | ||
"typescript": "^5.0.3" | ||
"rimraf": "^5.0.1", | ||
"typescript": "^5.0.4" | ||
}, | ||
@@ -55,3 +55,3 @@ "files": [ | ||
}, | ||
"gitHead": "e95b10ae0d7c6f01b627217333eb9a630f16e546" | ||
"gitHead": "81780af779209cd2709989a4ed342a9aaf54f79c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56419
151
1
1
+ Addedgatsby-core-utils@4.12.0-next.0(transitive)
- Removedgatsby-core-utils@4.13.1(transitive)