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

Make a release to npm? #2

Closed
dblock opened this issue Jul 2, 2024 · 4 comments
Closed

Make a release to npm? #2

dblock opened this issue Jul 2, 2024 · 4 comments
Assignees

Comments

@dblock
Copy link
Contributor

dblock commented Jul 2, 2024

I know this project is old, but was hoping to add smile support to https://github.com/opensearch-project/opensearch-api-specification similar to CBOR added in opensearch-project/opensearch-api-specification#371.

@ngyewch
Copy link
Owner

ngyewch commented Jul 3, 2024

Let me see what I can do.

@ngyewch ngyewch self-assigned this Jul 3, 2024
@ngyewch
Copy link
Owner

ngyewch commented Jul 4, 2024

Here you go https://www.npmjs.com/package/smile-js

@dblock
Copy link
Contributor Author

dblock commented Jul 8, 2024

I tried using it in opensearch-project/opensearch-api-specification#386, getting this:

$ npm run test:spec--insecure -- --tests=tests/cat

> opensearch_api_tools@1.0.0 test:spec--insecure
> ts-node tools/src/tester/test.ts --opensearch-insecure --tests=tests/cat

Error: Cannot find module '/Users/dblock/source/opensearch-project/opensearch-api-specification/dblock-opensearch-api-specification/node_modules/smile-js/dist/smile-js.umd.cjs'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1016:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1009:15)
    at resolveExports (node:internal/modules/cjs/loader:529:14)
    at Function.Module._findPath (node:internal/modules/cjs/loader:569:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:981:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/dblock/source/opensearch-project/opensearch-api-specification/dblock-opensearch-api-specification/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/dblock/source/opensearch-project/opensearch-api-specification/dblock-opensearch-api-specification/tools/src/tester/ChapterReader.ts:18:1) {
  code: 'MODULE_NOT_FOUND',
  path: '/Users/dblock/source/opensearch-project/opensearch-api-specification/dblock-opensearch-api-specification/node_modules/smile-js/package.json'
}

Is adding a .d.ts file enough to fix this? Possible?

https://stackoverflow.com/questions/78698791/typescript-project-cant-find-umd-module-during-import

@dblock
Copy link
Contributor Author

dblock commented Jul 8, 2024

I'll contribute a definition to https://github.com/DefinitelyTyped/DefinitelyTyped, but since this is a typescript project maybe you want to do something else? Thanks for making a release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants