diff --git a/.craft.yml b/.craft.yml index 4f01a2319ce6..c06d90bc7689 100644 --- a/.craft.yml +++ b/.craft.yml @@ -2,6 +2,107 @@ minVersion: '0.23.1' changelogPolicy: simple preReleaseCommand: bash scripts/craft-pre-release.sh targets: + # NPM Targets + ## 1. Base Packages, node or browser SDKs depend on + ## 1.1 Types + - name: npm + id: "@sentry/types" + includeNames: /^sentry-types-\d.*\.tgz$/ + ## 1.2 Utils + - name: npm + id: "@sentry/utils" + includeNames: /^sentry-utils-\d.*\.tgz$/ + ## 1.3 Core SDK + - name: npm + id: "@sentry/core" + includeNames: /^sentry-core-\d.*\.tgz$/ + ## 1.4 Tracing package + - name: npm + id: "@sentry-internal/tracing" + includeNames: /^sentry-internal-tracing-\d.*\.tgz$/ + ## 1.5 Replay package (browser only) + - name: npm + id: "@sentry/replay" + includeNames: /^sentry-replay-\d.*\.tgz$/ + + ## 2. Browser & Node SDKs + - name: npm + id: "@sentry/browser" + includeNames: /^sentry-browser-\d.*\.tgz$/ + - name: npm + id: "@sentry/node" + includeNames: /^sentry-node-\d.*\.tgz$/ + + ## 3 Browser-based Packages + - name: npm + id: "@sentry/angular-ivy" + includeNames: /^sentry-angular-ivy-\d.*\.tgz$/ + - name: npm + id: "@sentry/angular" + includeNames: /^sentry-angular-\d.*\.tgz$/ + - name: npm + id: "@sentry/ember" + includeNames: /^sentry-ember-\d.*\.tgz$/ + - name: npm + id: "@sentry/react" + includeNames: /^sentry-react-\d.*\.tgz$/ + - name: npm + id: "@sentry/svelte" + includeNames: /^sentry-svelte-\d.*\.tgz$/ + - name: npm + id: "@sentry/vue" + includeNames: /^sentry-vue-\d.*\.tgz$/ + - name: npm + id: "@sentry/wasm" + includeNames: /^sentry-wasm-\d.*\.tgz$/ + - name: npm + id: "@sentry/integrations" + includeNames: /^sentry-integrations-\d.*\.tgz$/ + + ## 4. Node-based Packages + - name: npm + id: "@sentry/serverless" + includeNames: /^sentry-serverless-\d.*\.tgz$/ + - name: npm + id: "@sentry/opentelemetry-node" + includeNames: /^sentry-opentelemetry-node-\d.*\.tgz$/ + + ## 5. Fullstack/Meta Frameworks (depending on Node and Browser or Framework SDKs) + - name: npm + id: "@sentry/nextjs" + includeNames: /^sentry-nextjs-\d.*\.tgz$/ + - name: npm + id: "@sentry/remix" + includeNames: /^sentry-remix-\d.*\.tgz$/ + - name: npm + id: "@sentry/sveltekit" + includeNames: /^sentry-sveltekit-\d.*\.tgz$/ + - name: npm + id: "@sentry/gatsby" + includeNames: /^sentry-gatsby-\d.*\.tgz$/ + + ## 6. Other Packages + ## 6.1 + - name: npm + id: "@sentry-internal/typescript" + includeNames: /^sentry-internal-typescript-\d.*\.tgz$/ + - name: npm + id: "@sentry-internal/eslint-plugin-sdk" + includeNames: /^sentry-internal-eslint-plugin-sdk-\d.*\.tgz$/ + ## 6.2 + - name: npm + id: "@sentry-internal/eslint-config-sdk" + includeNames: /^sentry-internal-eslint-config-sdk-\d.*\.tgz$/ + + ## 7. Deprecated packages we still release (but no packages depend on them anymore) + - name: npm + id: "@sentry/hub" + includeNames: /^sentry-hub-\d.*\.tgz$/ + - name: npm + id: "@sentry/tracing" + includeNames: /^sentry-tracing-\d.*\.tgz$/ + + # AWS Lambda Layer target - name: aws-lambda-layer includeNames: /^sentry-node-serverless-\d+.\d+.\d+(-(beta|alpha)\.\d+)?\.zip$/ layerName: SentryNodeServerlessSDK @@ -14,16 +115,22 @@ targets: - nodejs16.x - nodejs18.x license: MIT + + # CDN Bundle Target - name: gcs + id: "browser-cdn-bundles" includeNames: /.*\.js.*$/ bucket: sentry-js-sdk paths: - path: /{{version}}/ metadata: cacheControl: 'public, max-age=31536000' + + # Github Release Target - name: github includeNames: /^sentry-.*$/ - - name: npm + + # Sentry Release Registry Target - name: registry sdks: 'npm:@sentry/browser': diff --git a/docs/new-sdk-release-checklist.md b/docs/new-sdk-release-checklist.md index 075068a68cc9..aca0f0f399c4 100644 --- a/docs/new-sdk-release-checklist.md +++ b/docs/new-sdk-release-checklist.md @@ -58,8 +58,13 @@ When you’re ready to make the first release, there are a couple of steps that - [ ] 1) If not yet done, be sure to remove the `private: true` property from your SDK’s `package.json`. Additionally, ensure that `"publishConfig": {"access": "public"}` is set. - [ ] 2) Make sure that the new SDK is **not added** in`[craft.yml](https://github.com/getsentry/sentry-javascript/blob/master/.craft.yml)` as a target for the **Sentry release registry**\ *Once this is added, craft will try to publish an entry in the next release which does not work and caused failed release runs in the past* -- [ ] 3) Make sure the new SDK is not excluded from the github & npm targets in `.craft.yml` -- [ ] 4) Cut a new release (as usual, via GH release action and Craft) +- [ ] 3) Add an `npm` target in `craft.yml` for the new package. Make sure to insert it in the right place, after all the Sentry dependencies of your package but before packages that depend on your new package (if applicable). + ```yml + - name: npm + id: npm:@sentry/[yourPackage] + includeNames: /^sentry-[yourPackage]-\d.*\.tgz$/ + ``` +- [ ] 4) Cut a new release (as usual, see [Publishing Release](https://github.com/getsentry/sentry-javascript/blob/develop/docs/publishing-a-release.md)) ### After the Release