Skip to content
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

docs: Fixed npm publish issues with @deephaven/jsapi-nodejs #2265

Merged
merged 4 commits into from
Oct 22, 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
2 changes: 1 addition & 1 deletion packages/jsapi-nodejs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @deephaven/jsapi-components
# @deephaven/jsapi-nodejs

Deephaven utils for consuming Jsapi from a server from a nodejs app. It can
optionally convert the server module format from `ESM` -> `CJS` or `CJS` -> `ESM`
Expand Down
10 changes: 5 additions & 5 deletions packages/jsapi-nodejs/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './errorUtils';
export * from './fsUtils';
export * from './loaderUtils';
export * from './polyfillWs';
export * from './serverUtils';
export * from './errorUtils.js';
export * from './fsUtils.js';
export * from './loaderUtils.js';
export * from './polyfillWs.js';
export * from './serverUtils.js';
6 changes: 3 additions & 3 deletions packages/jsapi-nodejs/src/loaderUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import fs from 'node:fs';
import path from 'node:path';
import esbuild from 'esbuild';

import { downloadFromURL, urlToDirectoryName } from './serverUtils';
import { polyfillWs } from './polyfillWs';
import { ensureDirectoriesExist, getDownloadPaths } from './fsUtils';
import { downloadFromURL, urlToDirectoryName } from './serverUtils.js';
import { polyfillWs } from './polyfillWs.js';
import { ensureDirectoriesExist, getDownloadPaths } from './fsUtils.js';

type NonEmptyArray<T> = [T, ...T[]];

Expand Down
2 changes: 1 addition & 1 deletion packages/jsapi-nodejs/src/serverUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as http from 'node:http';
import * as https from 'node:https';
import { hasErrorCode, isAggregateError } from './errorUtils';
import { hasErrorCode, isAggregateError } from './errorUtils.js';

export const SERVER_STATUS_CHECK_TIMEOUT = 3000;

Expand Down
7 changes: 7 additions & 0 deletions packages/jsapi-nodejs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
// NodeNext is the recommended module setting for Node.js v12 or later. This
// allows CommonJS and ESM consumers to use this package.
"module": "NodeNext",
// This is the required setting when `module` is set to `NodeNext`. One side
// effect of this setting is that relative imports require explicit `.js`
// extensions.
"moduleResolution": "NodeNext",
"rootDir": "src/",
"outDir": "dist/"
},
Expand Down
7 changes: 6 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
"excludeDirectories": ["**/node_modules", "**/dist"]
},
"references": [
// `npm run types` relies on project references to build types. All packages
// must be included in the reference tree somewhere. Top-level packages need
// to be included here, and their respective `tsconfig.json` files should
// reference their dependencies.
{ "path": "./packages/code-studio" },
{ "path": "./packages/embed-widget" }
{ "path": "./packages/embed-widget" },
{ "path": "./packages/jsapi-nodejs" }
]
}
Loading