Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .cursor/rules/javascript-development.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ alwaysApply: false
## Code Organization

- Maintain compatibility with existing npm package structure
- Update TypeScript definitions in `js/index.d.ts` if needed
- Consider impact on installation flow in `scripts/install.js`
- Test across different Node.js versions

Expand All @@ -36,6 +35,6 @@ npm run check:types

## TypeScript Support

- Type definitions maintained in `js/index.d.ts`
- Type definitions are generated via TypeScript
- Sync with Rust CLI interface changes
- Consider backward compatibility for JS API
2 changes: 1 addition & 1 deletion .cursor/rules/sentry-cli-project.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This is **sentry-cli**, a command-line utility for working with Sentry. It's pri
## Project Structure

- `src/` - Core Rust source code with command modules and utilities
- `js/` - JavaScript wrapper and npm package code
- `lib/` - JavaScript wrapper and npm package code
- `scripts/` - Build and utility scripts
- `tests/integration/` - Integration tests using `.trycmd` format
- `npm-binary-distributions/` - Platform-specific binary packages
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/.cursor/rules/javascript-development.mdc @getsentry/team-javascript-sdks @getsentry/owners-sentry-cli
/.npmignore @getsentry/team-javascript-sdks @getsentry/owners-sentry-cli
/bin/ @getsentry/team-javascript-sdks @getsentry/owners-sentry-cli # these are the JS "binaries"
/js @getsentry/team-javascript-sdks @getsentry/owners-sentry-cli
/lib @getsentry/team-javascript-sdks @getsentry/owners-sentry-cli
/package.json @getsentry/team-javascript-sdks @getsentry/owners-sentry-cli
/scripts/*.js @getsentry/team-javascript-sdks @getsentry/owners-sentry-cli
/tsconfig.json @getsentry/team-javascript-sdks @getsentry/owners-sentry-cli
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ jobs:
with:
node-version: '20.10.0'

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Download compiled binaries
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # 6.0.0
with:
Expand Down
36 changes: 34 additions & 2 deletions .github/workflows/test_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Install dependencies via npm ci
if: ${{ !inputs.triggered-by-release }}
run: npm ci
run: npm ci --ignore-scripts

# For pushes to the release branch, we need to install the dependencies via `npm install`
# because the `package-lock.json` is not updated with the new versions of the optional
Expand All @@ -37,7 +37,30 @@ jobs:

- run: npm run check:types

prepare_build:
name: Prepare Build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0

- name: Use Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # 6.0.0
with:
node-version-file: package.json

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Build
run: npm run build

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
with:
name: artifact-build
path: js

test_node:
needs: prepare_build
strategy:
fail-fast: false
matrix:
Expand All @@ -56,7 +79,7 @@ jobs:

- name: Install dependencies via npm ci
if: ${{ !inputs.triggered-by-release }}
run: npm ci
run: npm ci --ignore-scripts

# For pushes to the release branch, we need to install the dependencies via `npm install`
# because the `package-lock.json` is not updated with the new versions of the optional
Expand All @@ -65,6 +88,15 @@ jobs:
if: ${{ inputs.triggered-by-release }}
run: npm install --omit=optional --ignore-scripts

- name: Download build artifact
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # 5.0.0
with:
name: artifact-build
path: js

- name: Install CLI
run: npm run install-cli

# older node versions need an older nft
- run: SENTRYCLI_SKIP_DOWNLOAD=1 npm install @vercel/nft@0.22.1
if: matrix.node-version == '10.x' || matrix.node-version == '12.x'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ target
node_modules
coverage
dist
js
dump
checksums.txt
yarn-error.log
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@

- Slightly sped up the `sentry-cli sourcemaps upload` command by eliminating an HTTP request to the Sentry server, which was not required in most cases ([#2913](https://github.com/getsentry/sentry-cli/pull/2913)).

### Internal changes

- Migrated JavaScript wrapper to TypeScript for better type safety ([#2910](https://github.com/getsentry/sentry-cli/pull/2910))

## 2.57.0

### New Features
Expand Down
248 changes: 0 additions & 248 deletions js/index.d.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions js/helper.js → lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ function getPath() {
* exits with a non-zero exit code.
* @param {boolean} silent Disable stdout for silents build (CI/Webpack Stats, ...)
* @param {string} [configFile] Relative or absolute path to the configuration file.
* @param {Object} [config] More configuration to pass to the CLI
* @returns {Promise.<string>} A promise that resolves to the standard output.
* @param {import('./index').SentryCliOptions} [config] More configuration to pass to the CLI
* @returns {Promise<string>} A promise that resolves to the standard output.
*/
async function execute(args, live, silent, configFile, config = {}) {
const env = { ...process.env };
Expand Down
Loading