Skip to content

Commit 735b3fc

Browse files
authored
Merge pull request #28 from AtidaTech/release-1.0.1
Release 1.0.1
2 parents 36ef00b + 1d98b72 commit 735b3fc

9 files changed

Lines changed: 15 additions & 28 deletions

.eslintrc

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@
44
"extends": [
55
"plugin:import/errors",
66
"plugin:import/warnings",
7-
"plugin:prettier/recommended",
8-
"plugin:jsx-a11y/recommended"
7+
"plugin:prettier/recommended"
98
],
109
"env": {
11-
"jest": true
10+
"node": true
1211
},
1312
"plugins": [
1413
"@typescript-eslint",
15-
"react",
16-
"react-hooks",
17-
"import",
18-
"jsx-a11y"
14+
"import"
1915
],
2016
"rules": {
2117
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
@@ -29,17 +25,7 @@
2925
"js": "always"
3026
}
3127
],
32-
"import/no-unresolved": "off",
33-
"jsx-a11y/anchor-is-valid": [
34-
"error",
35-
{
36-
"components": ["Link"],
37-
"specialLink": ["hrefLeft", "hrefRight"],
38-
"aspects": ["invalidHref", "preferButton"]
39-
}
40-
], // next/link api incompatible with no-href aspect
41-
"react-hooks/rules-of-hooks": "error",
42-
"react-hooks/exhaustive-deps": "warn"
28+
"import/no-unresolved": "off"
4329
},
4430
"settings": {
4531
"import/parser": "@typescript-eslint/parser",
@@ -66,7 +52,7 @@
6652
"argsIgnorePattern": "^_"
6753
}
6854
],
69-
"@typescript-eslint/no-extra-semi": "off" // conflicts with prettier
55+
"@typescript-eslint/no-extra-semi": "off"
7056
}
7157
}
7258
]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ Find an Entry in a specific Content Type and locale by its unique identifier fie
506506

507507
#### Parameters
508508
- `environment` - Environment Object (you can retrieve it with [getEnvironment](#-getenvironment)).
509+
- `contentTypeId` - The ID of the content-type to search in.
509510
- `fieldId` - The ID of the unique field to search for. A unique field is usually a mandatory and unique field in the Content-type (ie: slug).
510511
- `fieldValue` - The value to search for in the unique field.
511512
- `fieldLocale` - The locale to search in for the unique field. If not provided, the default locale will be used.

lib/getAllEntryTags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export async function getAllEntryTags(environment, verbosityLevel = 1) {
3333

3434
verbosityLevel > 1 &&
3535
console.log(
36-
`%%/DEBUG: Found ${allTags?.items?.length} Content-types in environment ${environmentId}`
36+
`%%/DEBUG: Found ${allTags?.items?.length} Tags in environment ${environmentId}`
3737
)
3838

3939
return allTags

lib/getContentTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function getContentTypes(environment, verbosityLevel = 1) {
2424
items: []
2525
}
2626

27-
if (!(await validateInputs(environment, 'getEntry', verbosityLevel))) {
27+
if (!(await validateInputs(environment, 'getContentTypes', verbosityLevel))) {
2828
return emptyCollection
2929
}
3030

lib/locales/getAllLocalesCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function getAllLocalesCode(environment, verbosityLevel = 1) {
2828
const allLocales = await getAllLocales(environment, verbosityLevel)
2929
const allLocalesLength = allLocales?.items?.length ?? 0
3030

31-
if (allLocales !== []) {
31+
if (allLocales?.items?.length > 0) {
3232
let allLocalesCodes = []
3333
for (let i = 0; i < allLocalesLength; i++) {
3434
if (allLocales.items[i]?.code !== undefined) {

lib/release/linkAliasToEnvironment.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { orderBy } from 'natural-orderby'
88
* @param {string} destinationAliasId - The ID of the Alias to which the Environment will be linked to.
99
* @param {string} releaseRegEx - Regular expression to identify release Environments.
1010
* @param {string} protectedEnvironments - Safety measure when deleting old release to not deleted important Environments.
11-
* @param {string} deleteOldReleases - If ture, it deletes all release Environments, except the newly linked one and the previous one.
11+
* @param {boolean} deleteOldReleases - If true, it deletes all release Environments, except the newly linked one and the previous one.
1212
* @param {number} [verbosityLevel=1] - 0 = NONE, 1 = ERROR, 2 = DEBUG, 3 = INFO
1313
* @return {Promise<void>}
1414
*/
@@ -56,7 +56,7 @@ export async function linkAliasToEnvironment(
5656
// Add Check destination environment alias exists
5757
if (!(await space.getEnvironment(destinationAliasId))) {
5858
console.error(
59-
`@@ERROR: Destination Environment alias '${destinationAliasId}' already exists!`
59+
`@@/ERROR: Destination Environment alias '${destinationAliasId}' already exists!`
6060
)
6161
return
6262
}

lib/release/syncScheduledActions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export async function syncScheduledActions(
6666
) {
6767
verbosityLevel > 0 &&
6868
console.error(
69-
`@@/ERROR: Destination Environment: '${sourceEnvironmentId}' does not exist.`
69+
`@@/ERROR: Destination Environment: '${destinationEnvironmentId}' does not exist.`
7070
)
7171
return
7272
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "contentful-lib-helpers",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"type": "module",
55
"description": "Helpers for Contentful's Content Management API",
66
"homepage": "https://github.com/AtidaTech/contentful-lib-helpers",

0 commit comments

Comments
 (0)