@frontity/file-settings
Advanced tools
Comparing version 1.1.4 to 1.1.5-infinite-scroll-beta.0
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
## [1.1.5](https://github.com/frontity/frontity/compare/@frontity/file-settings@1.1.4...@frontity/file-settings@1.1.5) (2019-11-04) | ||
**Note:** Version bump only for package @frontity/file-settings | ||
## [1.1.4](https://github.com/frontity/frontity/compare/@frontity/file-settings@1.1.3...@frontity/file-settings@1.1.4) (2019-10-02) | ||
### Bug Fixes | ||
* **typescript:** update to latest version ([a89b11c](https://github.com/frontity/frontity/commit/a89b11c)) | ||
- **typescript:** update to latest version ([a89b11c](https://github.com/frontity/frontity/commit/a89b11c)) | ||
## [1.1.3](https://github.com/frontity/frontity/compare/@frontity/file-settings@1.1.2...@frontity/file-settings@1.1.3) (2019-09-10) | ||
@@ -21,6 +17,2 @@ | ||
## [1.1.2](https://github.com/frontity/frontity/compare/@frontity/file-settings@1.1.1...@frontity/file-settings@1.1.2) (2019-08-12) | ||
@@ -30,6 +22,2 @@ | ||
## [1.1.1](https://github.com/frontity/frontity/compare/@frontity/file-settings@1.1.0...@frontity/file-settings@1.1.1) (2019-07-12) | ||
@@ -39,49 +27,28 @@ | ||
# [1.1.0](https://github.com/frontity/frontity/compare/@frontity/file-settings@1.0.0...@frontity/file-settings@1.1.0) (2019-06-19) | ||
### Features | ||
* **packages:** creates packages @frontity/components, @frontity/hooks, and adds image processor to @frontity/html2react ([#130](https://github.com/frontity/frontity/issues/130)) ([6af4aa1](https://github.com/frontity/frontity/commit/6af4aa1)) | ||
- **packages:** creates packages @frontity/components, @frontity/hooks, and adds image processor to @frontity/html2react ([#130](https://github.com/frontity/frontity/issues/130)) ([6af4aa1](https://github.com/frontity/frontity/commit/6af4aa1)) | ||
# [1.0.0](https://github.com/frontity/frontity/compare/@frontity/file-settings@0.3.0...@frontity/file-settings@1.0.0) (2019-06-05) | ||
### Bug Fixes | ||
* **all:** update typscript and fix some keywords ([1fe5fec](https://github.com/frontity/frontity/commit/1fe5fec)) | ||
- **all:** update typscript and fix some keywords ([1fe5fec](https://github.com/frontity/frontity/commit/1fe5fec)) | ||
### Features | ||
* add some keywords ([9267faa](https://github.com/frontity/frontity/commit/9267faa)) | ||
- add some keywords ([9267faa](https://github.com/frontity/frontity/commit/9267faa)) | ||
### BREAKING CHANGES | ||
* get this packages to 1.0.0 | ||
- get this packages to 1.0.0 | ||
# [0.3.0](https://github.com/frontity/frontity/compare/@frontity/file-settings@0.2.2...@frontity/file-settings@0.3.0) (2019-06-05) | ||
### Features | ||
* **core:** refactor entry-points for new modes and files ([#98](https://github.com/frontity/frontity/issues/98)) ([1713522](https://github.com/frontity/frontity/commit/1713522)) | ||
- **core:** refactor entry-points for new modes and files ([#98](https://github.com/frontity/frontity/issues/98)) ([1713522](https://github.com/frontity/frontity/commit/1713522)) | ||
## [0.2.2](https://github.com/frontity/frontity/compare/@frontity/file-settings@0.2.1...@frontity/file-settings@0.2.2) (2019-05-15) | ||
@@ -91,6 +58,2 @@ | ||
## [0.2.1](https://github.com/frontity/frontity/compare/@frontity/file-settings@0.2.0...@frontity/file-settings@0.2.1) (2019-05-15) | ||
@@ -100,22 +63,12 @@ | ||
# [0.2.0](https://github.com/frontity/frontity/compare/@frontity/file-settings@0.1.0...@frontity/file-settings@0.2.0) (2019-05-15) | ||
### Features | ||
* **frontity:** use the frontity package as interface for the core packages ([#48](https://github.com/frontity/frontity/issues/48)) ([429e795](https://github.com/frontity/frontity/commit/429e795)) | ||
- **frontity:** use the frontity package as interface for the core packages ([#48](https://github.com/frontity/frontity/issues/48)) ([429e795](https://github.com/frontity/frontity/commit/429e795)) | ||
# 0.1.0 (2019-03-27) | ||
### Features | ||
* **all:** create `file-settings` package ([a6b196a](https://github.com/frontity/frontity/commit/a6b196a)) | ||
- **all:** create `file-settings` package ([a6b196a](https://github.com/frontity/frontity/commit/a6b196a)) |
@@ -14,4 +14,4 @@ "use strict"; | ||
mode, | ||
packages: packages.filter(pkg => pkg.active).map(pkg => pkg.name) | ||
packages: packages.filter((pkg) => pkg.active).map((pkg) => pkg.name), | ||
})); | ||
}; |
@@ -19,3 +19,3 @@ "use strict"; | ||
if (name) { | ||
const settings = allSettings.find(s => s.name === name); | ||
const settings = allSettings.find((s) => s.name === name); | ||
if (settings) | ||
@@ -36,3 +36,3 @@ return settings; | ||
// Filter them to get only the ones that match the `url` | ||
.filter(match => new RegExp(match).test(url)) | ||
.filter((match) => new RegExp(match).test(url)) | ||
// Sort them by length and pick the longest one. | ||
@@ -42,6 +42,6 @@ .sort((a, b) => b.length - a.length)[0]; | ||
if (validMatch) | ||
return allSettings.find(settings => settings.match && settings.match.includes(validMatch)); | ||
return allSettings.find((settings) => settings.match && settings.match.includes(validMatch)); | ||
// 4. Return the first settings without a match defined or, | ||
// if all of them have match, the first settings in the array. | ||
return allSettings.filter(settings => !settings.match)[0] || allSettings[0]; | ||
return allSettings.filter((settings) => !settings.match)[0] || allSettings[0]; | ||
}; |
@@ -16,5 +16,4 @@ "use strict"; | ||
exports.default = async () => { | ||
const { default: settings } = await Promise.resolve().then(() => __importStar(require(process.env.CWD + | ||
"/frontity.settings"))); | ||
const { default: settings } = await Promise.resolve().then(() => __importStar(require(process.env.CWD + "/frontity.settings"))); | ||
return normalizeSettings_1.default(settings); | ||
}; |
@@ -22,7 +22,7 @@ "use strict"; | ||
mode: "default", | ||
state: {} | ||
state: {}, | ||
}; | ||
const defaultPackage = { | ||
active: true, | ||
state: {} | ||
state: {}, | ||
}; | ||
@@ -32,3 +32,3 @@ // This function merges the imported settings with the default settings. | ||
var { packages } = _a, settings = __rest(_a, ["packages"]); | ||
return (Object.assign(Object.assign({}, mergeDeepRight_1.default(defaultSettings, settings)), { packages: packages.map(pkg => typeof pkg === "string" | ||
return (Object.assign(Object.assign({}, mergeDeepRight_1.default(defaultSettings, settings)), { packages: packages.map((pkg) => typeof pkg === "string" | ||
? Object.assign(Object.assign({}, defaultPackage), { name: pkg }) : Object.assign(Object.assign({}, defaultPackage), pkg)) })); | ||
@@ -47,4 +47,4 @@ }; | ||
// Merge multi settings. | ||
return settings.map(s => mergeSettings(s)); | ||
return settings.map((s) => mergeSettings(s)); | ||
}; | ||
exports.default = normalizeSettings; |
@@ -12,4 +12,4 @@ "use strict"; | ||
const uniquePackages = uniq_1.default(packages | ||
.map(pkg => (typeof pkg === "string" ? pkg : pkg.name)) | ||
.filter(pkg => pkg)); | ||
.map((pkg) => (typeof pkg === "string" ? pkg : pkg.name)) | ||
.filter((pkg) => pkg)); | ||
if (uniquePackages.length < packages.length) { | ||
@@ -27,5 +27,5 @@ throw new Error("All the packages must have a unique name."); | ||
// Validate packages in multi settings. | ||
settings.forEach(s => validatePackages(s.packages)); | ||
settings.forEach((s) => validatePackages(s.packages)); | ||
// Check that every multi settings has a unique name. | ||
const uniqueNames = uniqBy_1.default(s => s.name, settings.filter(s => s.name)); | ||
const uniqueNames = uniqBy_1.default((s) => s.name, settings.filter((s) => s.name)); | ||
if (uniqueNames.length < settings.length) { | ||
@@ -32,0 +32,0 @@ throw new Error("All the settings must have a unique name."); |
@@ -1,6 +0,2 @@ | ||
module.exports = { | ||
transform: { "^.+\\.tsx?$": "ts-jest" }, | ||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", | ||
moduleFileExtensions: ["ts", "tsx", "js", "jsx"], | ||
testPathIgnorePatterns: ["/mocks/"] | ||
}; | ||
const rootConfig = require("../../jest.config.js"); | ||
module.exports = rootConfig; |
{ | ||
"name": "@frontity/file-settings", | ||
"version": "1.1.4", | ||
"description": "file settings package", | ||
"author": "Eduardo Campaña <asrielo@gmail.com>", | ||
"version": "1.1.5-infinite-scroll-beta.0", | ||
"description": "A settings package for Frontity that uses a frontity.settings.js file.", | ||
"homepage": "https://github.com/frontity/frontity", | ||
@@ -18,5 +17,2 @@ "license": "Apache-2.0", | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"bugs": { | ||
@@ -26,5 +22,5 @@ "url": "https://github.com/frontity/frontity/issues" | ||
"scripts": { | ||
"test:ci": "jest", | ||
"test": "jest --watch", | ||
"test:inspect": "node --inspect ./node_modules/.bin/jest --watch --no-cache --runInBand", | ||
"test:ci": "../../node_modules/.bin/jest --ci --coverage", | ||
"test": "../../node_modules/.bin/jest --watch", | ||
"test:inspect": "node --inspect ../../node_modules/.bin/jest --watch --no-cache --runInBand", | ||
"build": "tsc --project ./tsconfig.build.json", | ||
@@ -37,10 +33,5 @@ "prepublish": "npm run build" | ||
"devDependencies": { | ||
"@frontity/types": "^1.1.2", | ||
"@types/jest": "^24.0.11", | ||
"@types/ramda": "^0.26.6", | ||
"jest": "^24.7.1", | ||
"ts-jest": "^24.0.2", | ||
"typescript": "^3.6.3" | ||
}, | ||
"gitHead": "470f4d8a3d8f4575551151190849fd28ffe6b3a4" | ||
"@frontity/types": "^1.4.1-infinite-scroll-beta.0", | ||
"@types/ramda": "0.26.33" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
130094
2
61
1496
1
1
1