Skip to content

Commit

Permalink
Update lodash and linter fixes (#27)
Browse files Browse the repository at this point in the history
* SNODE-7 update and linter fixes

* SNODE-7 update changelog [skip ci]
  • Loading branch information
bodrovis authored Nov 10, 2020
1 parent da23043 commit ec9541c
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 57 deletions.
4 changes: 4 additions & 0 deletions docs/additional_info/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 5.2.2 (09-Nov-20)

* Update lodash to the latest version

## 5.2.1 (03-Nov-20)

* Update dependencies
Expand Down
56 changes: 28 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lokalise/node-api",
"version": "5.2.1",
"version": "5.2.2",
"description": "Official Lokalise API 2.0 Node.js client",
"license": "BSD-3-Clause",
"repository": {
Expand Down Expand Up @@ -30,10 +30,11 @@
"chai": "^4.2.0",
"codecov": "^3.8.1",
"dotenv": "^8.2.0",
"eslint": "^7.12.1",
"eslint": "^7.13.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"lodash": "^4.17.20",
"mocha": "^8.2.1",
"mocha-cassettes": "1.2.1",
"nyc": "^15.1",
Expand Down
34 changes: 19 additions & 15 deletions test/keys/keys.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe("Keys", function () {
description: "Index app welcome",
platforms: ["web"],
filenames: {
web: "my_filename.json"
web: "my_filename.json",
},
translations: [
{
Expand Down Expand Up @@ -101,7 +101,7 @@ describe("Keys", function () {

expect(keys[0].key_name["web"]).to.eq("welcome_web");
expect(keys[0].platforms).to.include("web");
expect(keys[0].filenames['web']).to.eq("my_filename.json");
expect(keys[0].filenames["web"]).to.eq("my_filename.json");
expect(keys[0].translations[1].translation).to.eq("Welcome");

expect(keys[1].key_name["ios"]).to.eq("welcome_ios");
Expand All @@ -113,22 +113,26 @@ describe("Keys", function () {
cassette
.createTest("create per-platform", async () => {
const keys = await lokaliseApi.keys.create(
[{
key_name: {
ios: "name_for_ios",
web: "name_for_web",
android: "android_name",
other: "other_name"
[
{
key_name: {
ios: "name_for_ios",
web: "name_for_web",
android: "android_name",
other: "other_name",
},
platforms: ["web", "ios"],
translations: [
{
language_iso: "en",
translation: "Per-platform key names",
},
],
},
platforms: ["web", "ios"],
translations: [{
language_iso: "en",
translation: "Per-platform key names"
}],
}],
],
{ project_id: project_id }
);
const key = keys[0]
const key = keys[0];

expect(key.key_name["web"]).to.eq("name_for_web");
expect(key.key_name["ios"]).to.eq("name_for_ios");
Expand Down
24 changes: 12 additions & 12 deletions test/translations/translations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ describe("Translations", function () {
})
.register(this);

cassette
.createTest("list with opts", async () => {
const translations = await lokaliseApi.translations.list({
project_id: project_id,
filter_is_reviewed: 0,
filter_lang_id: 803
});
expect(translations[0].translation_id).to.eq(304581213);
expect(translations[0].language_iso).to.eq("sq");
})
.register(this);
cassette
.createTest("list with opts", async () => {
const translations = await lokaliseApi.translations.list({
project_id: project_id,
filter_is_reviewed: 0,
filter_lang_id: 803,
});

expect(translations[0].translation_id).to.eq(304581213);
expect(translations[0].language_iso).to.eq("sq");
})
.register(this);

cassette
.createTest("get", async () => {
Expand Down

0 comments on commit ec9541c

Please sign in to comment.