Skip to content

Commit

Permalink
Merge pull request #138 from sosna/develop
Browse files Browse the repository at this point in the history
Release 2.15.3
  • Loading branch information
sosna committed Aug 17, 2020
2 parents 0466727 + 639b053 commit e476404
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"node": ">=10"
},
"description": "SDMX REST API client for JavaScript",
"version": "2.15.2",
"version": "2.15.3",
"main": "./lib/index.js",
"scripts": {
"prebuild": "rm -rf lib && mkdir lib",
Expand Down Expand Up @@ -57,18 +57,18 @@
"devDependencies": {
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"codecov": "3.6.5",
"codecov": "3.7.2",
"coffee-coverage": "3.0.1",
"coffeeify": "3.0.1",
"coffeelint": "2.1.0",
"coffeescript": "2.4.1",
"commitizen": "4.0.3",
"cz-conventional-changelog": "3.1.0",
"husky": "4.2.3",
"commitizen": "4.1.2",
"cz-conventional-changelog": "3.2.0",
"husky": "4.2.5",
"istanbul": "0.4.5",
"mocha": "5.2.0",
"nock": "12.0.1",
"semantic-release": "17.0.4"
"nock": "13.0.4",
"semantic-release": "17.1.1"
},
"config": {
"commitizen": {
Expand Down
17 changes: 16 additions & 1 deletion src/data/data-format.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ formats =
# The SDMX-JSON 1.0.0 data format.
SDMX_JSON_1_0_0: 'application/vnd.sdmx.data+json;version=1.0.0'

# The SDMX-CSV 1.0.0 data format.
# The SDMX-CSV 1.0.0 data format, with default labels and
# non-normalized periods
SDMX_CSV_1_0_0: 'application/vnd.sdmx.data+csv;version=1.0.0'

# Shortcut for the latest version of SDMX-JSON
Expand All @@ -34,6 +35,20 @@ formats =
# Shortcut for the latest version of SDMX-CSV
SDMX_CSV: 'application/vnd.sdmx.data+csv;version=1.0.0'

# The SDMX-CSV 1.0.0 data format, with ID and name as labels
SDMX_CSV_WITH_BOTH_LABELS:
'application/vnd.sdmx.data+csv;version=1.0.0;labels=both'

# The SDMX-CSV 1.0.0 data format, with normalized periods
SDMX_CSV_WITH_NORMALIZED_PERIODS:
'application/vnd.sdmx.data+csv;version=1.0.0;timeFormat=normalized'

# The SDMX-CSV 1.0.0 data format, with default ID and name as labels,
# as well as normalized periods
SDMX_CSV_WITH_BOTH_LABELS_AND_NORMALIZED_PERIODS:
'application/vnd.sdmx.data+csv;version=1.0.0;\
labels=both;timeFormat=normalized'

# Shortcut for the latest version of SDMX-ML Generic
SDMX_ML_GENERIC: 'application/vnd.sdmx.genericdata+xml;version=2.1'

Expand Down
3 changes: 3 additions & 0 deletions test/data/data-format.test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ describe 'Data formats', ->
'application/vnd.sdmx.data+json;version=1.0.0-cts'
'application/vnd.sdmx.data+json;version=1.0.0'
'application/vnd.sdmx.data+csv;version=1.0.0'
'application/vnd.sdmx.data+csv;version=1.0.0;labels=both'
'application/vnd.sdmx.data+csv;version=1.0.0;timeFormat=normalized'
'application/vnd.sdmx.data+csv;version=1.0.0;labels=both;timeFormat=normalized'
]

it 'contains all the expected formats and only those', ->
Expand Down

0 comments on commit e476404

Please sign in to comment.