Skip to content

build(profiling-node): make sure debug build plugin is used #10534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 6, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ jobs:
id: changed
with:
filters: |
workflow: &workflow
- '.github/**'
shared: &shared
- *workflow
- '*.{js,ts,json,yml,lock}'
- 'CHANGELOG.md'
- '.github/**'
- 'jest/**'
- 'scripts/**'
- 'packages/core/**'
Expand Down Expand Up @@ -137,8 +139,11 @@ jobs:
- *shared
- 'packages/node/**'
- 'packages/profiling-node/**'
- 'dev-packages/e2e-tests/test-applications/node-profiling/**'
profiling_node_bindings:
- *workflow
- 'packages/profiling-node/bindings/**'
- 'dev-packages/e2e-tests/test-applications/node-profiling/**'
deno:
- *shared
- *browser
Expand Down Expand Up @@ -1120,11 +1125,6 @@ jobs:

- name: Build Profiling tarball
run: yarn build:tarball --scope @sentry/profiling-node

- name: Install esbuild
if: ${{ matrix.test-application == 'node-profiling' }}
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
run: yarn add [email protected]
# End rebuild profiling

- name: Restore tarball cache
Expand Down
3 changes: 2 additions & 1 deletion dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"dotenv": "16.0.3",
"glob": "8.0.3",
"ts-node": "10.9.1",
"yaml": "2.2.2"
"yaml": "2.2.2",
"esbuild": "0.20.0"
},
"volta": {
"node": "18.17.1",
Expand Down
31 changes: 9 additions & 22 deletions packages/profiling-node/rollup.npm.config.mjs
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import { makeBaseNPMConfig, makeNPMConfigVariants, plugins } from '@sentry-internal/rollup-utils';

const configs = makeNPMConfigVariants(makeBaseNPMConfig());
const cjsConfig = configs.find(config => config.output.format === 'cjs');

if (!cjsConfig) {
throw new Error('CJS config is required for profiling-node.');
}

const config = {
...cjsConfig,
input: 'src/index.ts',
output: { ...cjsConfig.output, file: 'lib/index.js', format: 'cjs', dir: undefined, preserveModules: false },
plugins: [
plugins.makeLicensePlugin('Sentry Node Profiling'),
resolve(),
commonjs(),
typescript({ tsconfig: './tsconfig.json' }),
],
};

export default config;
import { makeBaseNPMConfig } from '@sentry-internal/rollup-utils';

export default makeBaseNPMConfig({
packageSpecificConfig: {
input: 'src/index.ts',
output: { file: 'lib/index.js', format: 'cjs', dir: undefined, preserveModules: false },
plugins: [resolve(), commonjs(), typescript({ tsconfig: './tsconfig.json' })],
},
});
Loading