Skip to content

feat(remix): Add release / sourcemap upload script. - #5312

Merged
AbhiPrasad merged 6 commits into
masterfrom
onur/remix-release-cli
Jun 28, 2022
Merged

feat(remix): Add release / sourcemap upload script.#5312
AbhiPrasad merged 6 commits into
masterfrom
onur/remix-release-cli

Conversation

@onurtemizkan

@onurtemizkanonurtemizkan commented Jun 24, 2022

Copy link
Copy Markdown
Contributor

Ref: #4894

Adds a mini CLI tool to create releases and upload Remix sourcemaps with a default path / prefix.

Uses sentry-cli under the hood and requires a valid .sentryclirc to work.

Usage:

$ upload-sourcemaps
Usage: upload-sourcemaps --release RELEASE [--urlPrefix URL_PREFIX] [--buildPath BUILD_PATH]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--release The release number [string] [required]
--urlPrefix The url prefix for the sourcemaps [string]
--buildPath The path to the build directory [string]

Also removed webpack-related dependencies from Remix SDK, as we don't need them.

@onurtemizkanonurtemizkan added this to the Sentry Remix SDK milestone Jun 24, 2022
@github-actions

github-actionsBot commented Jun 24, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
@sentry/browser - ES5 CDN Bundle (gzipped + minified)19.3 KB (added)
@sentry/browser - ES5 CDN Bundle (minified)59.72 KB (added)
@sentry/browser - ES6 CDN Bundle (gzipped + minified)17.9 KB (added)
@sentry/browser - ES6 CDN Bundle (minified)52.67 KB (added)
@sentry/browser - Webpack (gzipped + minified)19.67 KB (added)
@sentry/browser - Webpack (minified)64.04 KB (added)
@sentry/react - Webpack (gzipped + minified)19.69 KB (added)
@sentry/nextjs Client - Webpack (gzipped + minified)43.85 KB (added)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)25.63 KB (added)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)23.9 KB (added)

@AbhiPrasadAbhiPrasad mentioned this pull request Jun 24, 2022
26 tasks

@AbhiPrasadAbhiPrasad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a note that if they need more advanced config to set up sentry-cli themselves?

Also any way we can unit test this script?

.option('buildPath', { type: 'string', describe: 'The path to the build directory' })
.usage('Usage: $0 --release RELEASE [--urlPrefix URL_PREFIX] [--buildPath BUILD_PATH]').argv;

const RELEASE = argv.release;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we default the release to use propose-version? (https://docs.sentry.io/product/cli/releases/#creating-releases)

@onurtemizkan
onurtemizkanforce-pushed the onur/remix-release-cli branch from f3a6fc4 to 9d87ae7CompareJune 27, 2022 13:54
@onurtemizkan

Copy link
Copy Markdown
ContributorAuthor

@AbhiPrasad,
updated the help output, switched to TS and added unit tests. There are also a few notes around. Could you have another look please?

// This is a workaround for that.
//
// eslint-disable-next-line @typescript-eslint/no-var-requires
const SentryCli = require('@sentry/cli') as typeof SentryCliModule;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, I’d rather just make this a javascript file and not have the workaround for TS. The unit tests should be enough to make sure we are enforcing correct behaviour.

@onurtemizkan
onurtemizkanforce-pushed the onur/remix-release-cli branch from 524d4e0 to b710150CompareJune 28, 2022 14:21

@AbhiPrasadAbhiPrasad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, great work @onurtemizkan to bring this to the finish line.

I can take care of the release registry work + unprivating the package + cutting an alpha release so we can test. We'll probably release this with 7.4.0-alpha.0.

In the meantime, do you mind getting started on the README/docs?

@AbhiPrasad
AbhiPrasad merged commit 7e044b1 into masterJun 28, 2022
@AbhiPrasad
AbhiPrasad deleted the onur/remix-release-cli branch June 28, 2022 15:41
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@onurtemizkan@AbhiPrasad