Skip to content

Commit

Permalink
feat: Add --decompress option to JS types (#1402)
Browse files Browse the repository at this point in the history
  • Loading branch information
FSchieber authored Nov 24, 2022
1 parent 634b11c commit 8267a50
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions js/__tests__/helper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ describe('SentryCli helper', () => {
'?hash=1337',
]);

expect(helper.prepareCommand(command, SOURCEMAPS_OPTIONS, { decompress: true })).toEqual([
'releases',
'files',
'release',
'upload-sourcemaps',
'/dev/null',
'--decompress',
]);

expect(
helper.prepareCommand(command, SOURCEMAPS_OPTIONS, { ignoreFile: '/js.ignore' })
).toEqual([
Expand Down
3 changes: 2 additions & 1 deletion js/releases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ class Releases {
* urlPrefix: '', // add a prefix source map urls after stripping them
* urlSuffix: '', // add a suffix source map urls after stripping them
* ext: ['js', 'map', 'jsbundle', 'bundle'], // override file extensions to scan for
* projects: ['node'] // provide a list of projects
* projects: ['node'], // provide a list of projects
* decompress: false // decompress gzip files before uploading
* });
*
* @param {string} release Unique name of the release.
Expand Down
4 changes: 4 additions & 0 deletions js/releases/options/uploadSourcemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ module.exports = {
param: '--dist',
type: 'string',
},
decompress: {
param: '--decompress',
type: 'boolean',
},
rewrite: {
param: '--rewrite',
invertedParam: '--no-rewrite',
Expand Down

0 comments on commit 8267a50

Please sign in to comment.