@datarailsshared/dr_renderer 1.5.129 → 1.5.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,7 +10,7 @@ on:
|
|
|
10
10
|
branches:
|
|
11
11
|
- 'master'
|
|
12
12
|
- 'main'
|
|
13
|
-
- '
|
|
13
|
+
- 'move-to-jfrog'
|
|
14
14
|
|
|
15
15
|
concurrency:
|
|
16
16
|
group: '${{ github.ref }}-${{ github.workflow }}'
|
|
@@ -18,7 +18,7 @@ concurrency:
|
|
|
18
18
|
|
|
19
19
|
permissions:
|
|
20
20
|
contents: read
|
|
21
|
-
packages:
|
|
21
|
+
packages: read
|
|
22
22
|
|
|
23
23
|
jobs:
|
|
24
24
|
publish-npm:
|
|
@@ -34,12 +34,40 @@ jobs:
|
|
|
34
34
|
secrets:
|
|
35
35
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
36
36
|
|
|
37
|
-
publish-
|
|
38
|
-
name: Publish to
|
|
37
|
+
publish-jfrog:
|
|
38
|
+
name: Publish to JFrog Artifactory
|
|
39
39
|
needs: publish-npm
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/move-to-jfrog') }}
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- name: Checkout code
|
|
44
|
+
uses: actions/checkout@v4
|
|
45
|
+
|
|
46
|
+
- name: Setup Node.js
|
|
47
|
+
uses: actions/setup-node@v4
|
|
48
|
+
with:
|
|
49
|
+
node-version: '14.16.1'
|
|
50
|
+
|
|
51
|
+
- name: Install dependencies
|
|
52
|
+
run: npm install
|
|
53
|
+
|
|
54
|
+
- name: Update package version
|
|
55
|
+
run: |
|
|
56
|
+
VERSION="${{ needs.publish-npm.outputs.version }}"
|
|
57
|
+
sed -i "s/{{cicd_version}}/$VERSION/g" package.json
|
|
58
|
+
echo "Updated package.json to version $VERSION"
|
|
59
|
+
|
|
60
|
+
- name: Configure npm for JFrog Artifactory
|
|
61
|
+
env:
|
|
62
|
+
ARTIFACTORY_NPM_REPO: ${{ secrets.ARTIFACTORY_NPM_REPO }}
|
|
63
|
+
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
|
|
64
|
+
run: |
|
|
65
|
+
REGISTRY_HOST=$(echo "$ARTIFACTORY_NPM_REPO" | sed 's|https://||' | sed 's|/$||')
|
|
66
|
+
{
|
|
67
|
+
echo "registry=${ARTIFACTORY_NPM_REPO}"
|
|
68
|
+
echo "//${REGISTRY_HOST}/:_authToken=${ARTIFACTORY_TOKEN}"
|
|
69
|
+
} > .npmrc
|
|
70
|
+
echo "✓ npm configured for JFrog Artifactory"
|
|
71
|
+
|
|
72
|
+
- name: Publish to JFrog Artifactory
|
|
73
|
+
run: npm publish
|
package/package.json
CHANGED
|
@@ -8238,11 +8238,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
8238
8238
|
lodash.forEach(values, (value, key) => {
|
|
8239
8239
|
const formatInfo = pivotData[type][key] || {};
|
|
8240
8240
|
const valueToFloat = parseFloat(value);
|
|
8241
|
-
const isBlankDate = formatInfo.type === 'Date' && (value === '' || value === '[blank]');
|
|
8242
8241
|
const isDate = formatInfo.type === 'Date' && (moment_lib(valueToFloat).isValid() || moment_lib(value, formatInfo.format).isValid());
|
|
8243
8242
|
const isNumberFormatting = !isDate && formatInfo.format && highchartsRenderer.isFormattingNumberAxis(pivotData);
|
|
8244
8243
|
|
|
8245
|
-
if (isNumberFormatting || isDate
|
|
8244
|
+
if (isNumberFormatting || isDate) {
|
|
8246
8245
|
values[key] = highchartsRenderer.returnRawDataValue(
|
|
8247
8246
|
formatInfo.type,
|
|
8248
8247
|
!isNaN(valueToFloat) ? valueToFloat : value,
|
|
@@ -5120,17 +5120,6 @@ describe('highcharts_renderer', () => {
|
|
|
5120
5120
|
const formattedKey = highchartsRenderer.getFormattedKey(initialKey, pivotData, type);
|
|
5121
5121
|
expect(formattedKey).toEqual(initialKey);
|
|
5122
5122
|
});
|
|
5123
|
-
|
|
5124
|
-
// some e2e tests exist that expects this behavior
|
|
5125
|
-
it('should format blank value with [blank] text', () => {
|
|
5126
|
-
const initialKey = ['DR_Others', ''];
|
|
5127
|
-
const pivotData = {
|
|
5128
|
-
colFormats: [{ type: "Text", name: "Month" }, { type: 'Date', name: "Date" }],
|
|
5129
|
-
};
|
|
5130
|
-
const type = 'colFormats';
|
|
5131
|
-
const formattedKey = highchartsRenderer.getFormattedKey(initialKey, pivotData, type);
|
|
5132
|
-
expect(formattedKey).toEqual(['DR_Others', '[blank]']);
|
|
5133
|
-
});
|
|
5134
5123
|
});
|
|
5135
5124
|
});
|
|
5136
5125
|
|