Skip to content

Commit 4e564d3

Browse files
authored
Merge pull request #598 from tidev/nodeDep
feat(all): update node dependencies
2 parents 963746e + 7d1d112 commit 4e564d3

File tree

8 files changed

+4429
-8898
lines changed

8 files changed

+4429
-8898
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: macos-latest
1212
strategy:
1313
matrix:
14-
node: [ '12', '14' ]
14+
node: [ '16' ]
1515
name: Node ${{ matrix.node }}
1616
steps:
1717
- uses: actions/checkout@v2
@@ -34,10 +34,10 @@ jobs:
3434
- run: npm ci
3535
name: Install dependencies
3636
if: steps.node-cache.outputs.cache-hit != 'true'
37-
37+
3838
- run: npm run lint
3939
name: Lint
40-
40+
4141
- name: Build and Test
4242
uses: reactivecircus/android-emulator-runner@v2
4343
with:
@@ -48,10 +48,10 @@ jobs:
4848

4949
- run: npm pack
5050
name: Package
51-
if: matrix.node == '12'
51+
if: matrix.node == '16'
5252

5353
- uses: actions/upload-artifact@v2
54-
if: matrix.node == '12'
54+
if: matrix.node == '16'
5555
with:
5656
name: node-titanium-sdk
5757
path: node-titanium-sdk-*.tgz

lib/jsanalyze.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ const path = require('path');
2626
const SOURCE_MAPPING_URL_REGEXP = /\/\/#[ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$/mg;
2727
const __ = appc.i18n(__dirname).__;
2828

29+
function sortObject(o) {
30+
const sorted = {};
31+
for (const key of Object.keys(o).sort()) {
32+
sorted[key] = o[key];
33+
}
34+
return sorted;
35+
}
36+
exports.sortObject = sortObject;
37+
2938
/**
3039
* Returns an object with the Titanium API usage statistics.
3140
*
@@ -228,7 +237,7 @@ exports.analyzeJs = function analyzeJs(contents, opts = {}) {
228237
// Well, if there's only one source with the same basename and we rename it to just the basename, that "fixes" the Web Inspector display
229238
// IDEA: What if we fix iOS to report URIs like /app.js as Android does, will that make it behave more properly?
230239
}
231-
240+
transformed.map = sortObject(transformed.map);
232241
// Do our own inlined source map so we can have control over the map object that is written!
233242
const base64Contents = Buffer.from(JSON.stringify(transformed.map)).toString('base64');
234243
// NOTE: We MUST append a \n or else iOS will break, because it injects a ';' after the

0 commit comments

Comments
 (0)