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
5 changes: 3 additions & 2 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"test-debug": "vitest --inspect-brk --no-file-parallelism --test-timeout=0",
"test-unit": "vitest run",
"test:clean": "find ./test/__fixtures__ -depth -name 'output.*' -type f -exec rm {} \\;",
"tslint": "tslint --config ../ts/tslint.json --project ."
"tslint": "tslint --config ../ts/tslint.json --project .",
"watch": "yarn build:cjs --watch & yarn build:esm --watch"
},
"dependencies": {
"@babel/core": "^7.28.0",
Expand Down Expand Up @@ -53,7 +54,7 @@
"cjs/*",
"esm/*"
],
"types": "src/index.ts",
"types": "cjs/index.d.ts",
"module": "esm/index.js",
"nx": {}
}
2 changes: 1 addition & 1 deletion packages/config/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/config/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./esm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"resolveJsonModule": true,
"types": [
"node"
]
],
"declaration": true
}
}
6 changes: 4 additions & 2 deletions packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"cjs/*",
"esm/*"
],
"types": "src/index.ts",
"types": "cjs/index.d.ts",
"scripts": {
"build": "yarn build:esm && yarn build:cjs",
"build-prod": "yarn build",
Expand All @@ -21,7 +21,9 @@
"test": "yarn test-unit",
"test-unit": "vitest run",
"test-debug": "vitest --inspect-brk --no-file-parallelism --test-timeout=0",
"tslint": "tslint --config ../ts/tslint.json --project ."
"tslint": "tslint --config ../ts/tslint.json --project .",
"watch": "yarn build:cjs --watch & yarn build:esm --watch"

},
"dependencies": {
"ansi_up": "5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./esm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"noUncheckedIndexedAccess": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"esModuleInterop": true
"esModuleInterop": true,
"declaration": true
}
}
2 changes: 1 addition & 1 deletion packages/icons/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"include": [
"index.ts"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/icons/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"include": [
"index.mts"
],
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/network-tools/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./lib",
"outDir": "./cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/network-tools/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./lib",
"outDir": "./esm",
Expand Down
2 changes: 1 addition & 1 deletion packages/network/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./lib",
"outDir": "./cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/network/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./lib",
"outDir": "./esm",
Expand Down
File renamed without changes.
5 changes: 1 addition & 4 deletions packages/resolve-dist/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import path from 'path'

let fs: typeof import('fs-extra')
import fs from 'fs-extra'

export type RunnerPkg = 'app' | 'runner'

Expand All @@ -11,8 +10,6 @@ export const resolveFromPackages = (...args: string[]) => {
}

const getRunnerContents = (filename: string) => {
fs ??= require('fs-extra') as typeof import('fs-extra')

return fs.readFile(getPathToDist('runner', filename))
}

Expand Down
2 changes: 1 addition & 1 deletion packages/resolve-dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"cjs/*",
"esm/*"
],
"types": "./lib/index.ts",
"types": "./cjs/index.d.ts",
"module": "esm/index.js",
"nx": {}
}
2 changes: 1 addition & 1 deletion packages/resolve-dist/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./lib",
"outDir": "./cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/resolve-dist/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./lib",
"outDir": "./esm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"compilerOptions": {
"allowJs": false,
"esModuleInterop": true,
"skipLibCheck": true
"skipLibCheck": true,
"declaration": true
}
}
4 changes: 3 additions & 1 deletion packages/root/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

Bundles the monorepo root `package.json` as an installable package, allowing `@packages/root` to be installed in any context without having an absolute reference to the root `package.json`

In order to accomplish this, `rollup` is used to bundle the `package.json`, as packages may be interpreted in place or be installed inside the `node_modules` directory. This package builds an `index.mjs` file for packages using `vite`/ ES Modules and an `index.js` file for any CommonJS entry points.
In order to accomplish this, `rollup` is used to bundle the `package.json`, as packages may be interpreted in place or be installed inside the `node_modules` directory. This package builds an `index.mjs` file for packages using `vite`/ ES Modules and an `index.js` file for any CommonJS entry points.

We currently don't use a watcher for this package because it is so small, so if any changes happen to the `package.json` in the root you will need to manually retrigger the build of this package.
5 changes: 3 additions & 2 deletions packages/scaffold-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .",
"test": "vitest run",
"test-debug": "vitest --inspect-brk --no-file-parallelism --test-timeout=0",
"tslint": "tslint --config ../ts/tslint.json --project ."
"tslint": "tslint --config ../ts/tslint.json --project .",
"watch": "yarn build:cjs --watch & yarn build:esm --watch"
},
"dependencies": {
"compare-versions": "4.1.3",
Expand All @@ -38,7 +39,7 @@
"cjs/*",
"esm/*"
],
"types": "src/index.ts",
"types": "cjs/index.d.ts",
"module": "esm/index.js",
"nx": {}
}
2 changes: 1 addition & 1 deletion packages/scaffold-config/tsconfig.browser.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"include": [
"src/dependencies.ts"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/scaffold-config/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/scaffold-config/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./esm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"noUncheckedIndexedAccess": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true
"skipLibCheck": true,
"declaration": true
}
}
2 changes: 1 addition & 1 deletion packages/telemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test-debug": "vitest --inspect-brk --no-file-parallelism --test-timeout=0",
"test-unit": "vitest run",
"tslint": "tslint --config ../ts/tslint.json --project .",
"watch": "tsc --watch"
"watch": "yarn build:cjs --watch & yarn build:esm --watch & yarn build:browser -w"
Copy link
Member

Choose a reason for hiding this comment

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

@AtofStryker Maybe not relevant to this PR, but I do see these warnings running this watch:

(!) Unresolved dependencies
https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
@opentelemetry/sdk-trace-web (imported by "src/client.ts")
@opentelemetry/resources (imported by "src/client.ts" and "src/telemetry/index.ts")
@opentelemetry/sdk-trace-base (imported by "src/client.ts" and "src/processors/on-start-span-processor.ts")
@opentelemetry/api (imported by "src/span-exporters/websocket-span-exporter.ts" and "src/telemetry/index.ts")
@opentelemetry/exporter-trace-otlp-http (imported by "src/span-exporters/websocket-span-exporter.ts")
@opentelemetry/semantic-conventions (imported by "src/telemetry/index.ts")
@opentelemetry/core (imported by "src/span-exporters/console-trace-link-exporter.ts")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is due to rollup not actually bundling the node_modules inside the browser version of the telemetry package, which is expected currently. At least for now, we likely want to keep the warnings present since it describes the behavior

},
"dependencies": {
"@opentelemetry/api": "1.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/telemetry/tsconfig.browser.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"include": [
"src/client.ts"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/telemetry/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"include": [
"src/**/*.ts"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/telemetry/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"include": [
"src/**/*.ts"
],
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"check-ts": "tsc -p tsconfig.cjs.json --noEmit",
"clean": "rimraf cjs esm",
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .",
"test": "vitest run"
"test": "vitest run",
"watch": "yarn build:cjs --watch & yarn build:esm --watch"
},
"dependencies": {
"semver": "^7.7.1"
Expand All @@ -33,7 +34,7 @@
"cjs/*",
"esm/*"
],
"types": "src/index.ts",
"types": "cjs/index.d.ts",
"module": "esm/index.js",
"workspaces": {
"nohoist": [
Expand Down
2 changes: 1 addition & 1 deletion packages/types/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./esm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"ignoreDeprecations": "5.0",
"importsNotUsedAsValues": "error",
"skipLibCheck": true,
"declaration": true,
"resolveJsonModule": true,
"types": [
"mocha",
Expand Down
Loading