diff --git a/nx.json b/nx.json index ce5a5117d822..d4a90a3a6777 100644 --- a/nx.json +++ b/nx.json @@ -35,8 +35,6 @@ "outputs": [ "{projectRoot}/build/esm", "{projectRoot}/build/cjs", - "{projectRoot}/build/lib/esm", - "{projectRoot}/build/lib/cjs", "{projectRoot}/build/npm/esm", "{projectRoot}/build/npm/cjs" ] diff --git a/packages/profiling-node/.eslintignore b/packages/profiling-node/.eslintignore index 0deb19641d74..ed07a0c4546a 100644 --- a/packages/profiling-node/.eslintignore +++ b/packages/profiling-node/.eslintignore @@ -1,4 +1,4 @@ node_modules/ build/ -lib/ +build/ coverage/ diff --git a/packages/profiling-node/.eslintrc.js b/packages/profiling-node/.eslintrc.js index 22c20a12dd77..ab3515d9ad37 100644 --- a/packages/profiling-node/.eslintrc.js +++ b/packages/profiling-node/.eslintrc.js @@ -4,7 +4,7 @@ module.exports = { }, extends: ['../../.eslintrc.js'], - ignorePatterns: ['lib/**/*', 'examples/**/*', 'vitest.config.ts'], + ignorePatterns: ['build/**/*', 'examples/**/*', 'vitest.config.ts'], rules: { '@sentry-internal/sdk/no-class-field-initializers': 'off', }, diff --git a/packages/profiling-node/.gitignore b/packages/profiling-node/.gitignore index 7a329e70a46c..a06983d7a102 100644 --- a/packages/profiling-node/.gitignore +++ b/packages/profiling-node/.gitignore @@ -2,5 +2,5 @@ # compiled output /node_modules/ -/lib/ +/build/ diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index a0b8d5a10aa5..6de0112b9521 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -6,26 +6,26 @@ "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/profiling-node", "author": "Sentry", "license": "MIT", - "main": "lib/cjs/index.js", - "module": "lib/esm/index.js", - "types": "lib/types/index.d.ts", + "main": "build/cjs/index.js", + "module": "build/esm/index.js", + "types": "build/types/index.d.ts", "exports": { "./package.json": "./package.json", ".": { "import": { - "types": "./lib/types/index.d.ts", - "default": "./lib/esm/index.js" + "types": "./build/types/index.d.ts", + "default": "./build/esm/index.js" }, "require": { - "types": "./lib/types/index.d.ts", - "default": "./lib/cjs/index.js" + "types": "./build/types/index.d.ts", + "default": "./build/cjs/index.js" } } }, "typesVersions": { "<5.0": { - "lib/types/index.d.ts": [ - "lib/types-ts3.8/index.d.ts" + "build/types/index.d.ts": [ + "build/types-ts3.8/index.d.ts" ] } }, @@ -39,19 +39,18 @@ "access": "public" }, "files": [ - "/lib", + "/build", "package.json", "/scripts/prune-profiler-binaries.js" ], "scripts": { - "clean": "rm -rf build && rm -rf lib", + "clean": "rm -rf build", "lint": "eslint . --format stylish", - "lint:es-compatibility": "es-check es2022 ./lib/cjs/*.js && es-check es2022 ./lib/esm/*.js --module", + "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", "fix": "eslint . --format stylish --fix", - "build": "yarn build:lib", - "build:lib": "yarn build:types && rollup -c rollup.npm.config.mjs", - "build:transpile": "yarn build:lib", - "build:types:downlevel": "yarn downlevel-dts lib/types lib/types-ts3.8 --to ts3.8", + "build": "yarn build:types && yarn build:transpile", + "build:transpile": "yarn rollup -c rollup.npm.config.mjs", + "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", "build:types": "tsc -p tsconfig.types.json && yarn build:types:downlevel", "build:types:watch": "tsc -p tsconfig.types.json --watch", "build:dev": "yarn clean && yarn build", diff --git a/packages/profiling-node/rollup.npm.config.mjs b/packages/profiling-node/rollup.npm.config.mjs index 05327bc1a29a..80b26c2ac232 100644 --- a/packages/profiling-node/rollup.npm.config.mjs +++ b/packages/profiling-node/rollup.npm.config.mjs @@ -4,7 +4,7 @@ export default makeNPMConfigVariants( makeBaseNPMConfig({ packageSpecificConfig: { output: { - dir: 'lib', + dir: 'build', // set exports to 'named' or 'auto' so that rollup doesn't warn exports: 'named', // set preserveModules to false because for profiling we actually want diff --git a/packages/profiling-node/tsconfig.json b/packages/profiling-node/tsconfig.json index 68bd9a52df2a..29acbf3f36e9 100644 --- a/packages/profiling-node/tsconfig.json +++ b/packages/profiling-node/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "module": "esnext", "lib": ["es2018"], - "outDir": "lib", + "outDir": "build", "types": ["node"] }, "include": ["src/**/*"] diff --git a/packages/profiling-node/tsconfig.types.json b/packages/profiling-node/tsconfig.types.json index d613534a1674..7a01535e9a4c 100644 --- a/packages/profiling-node/tsconfig.types.json +++ b/packages/profiling-node/tsconfig.types.json @@ -4,7 +4,7 @@ "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "outDir": "lib/types", + "outDir": "build/types", "types": ["node"] }, "files": ["src/index.ts"]