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

Remove CommonJS distribution and update packages #100

Merged
merged 8 commits into from
Jan 15, 2025
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 CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div
Examples of behavior that contributes to a positive environment for our community include:

-> Demonstrating empathy and kindness toward other people

- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
Expand Down Expand Up @@ -44,8 +45,8 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai

## Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 2.0, available at <a href="https://www.contributor-covenant.org/version/2/0/code_of_conduct.html">https://www.contributor-covenant.org/version/2/0/code_of_conduct.html</a>.
This Code of Conduct is adapted from the Contributor Covenant, version 2.0, available at [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).

Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

For answers to common questions about this code of conduct, see the FAQ at <a href="https://www.contributor-covenant.org/faq">https://www.contributor-covenant.org/faq</a>.
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq)
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Domino REST API Node.js SDK is a library that can help Node.js developers to bui

[![npm](https://nodei.co/npm/@hcl-software/domino-rest-sdk-node.png)](https://www.npmjs.com/package/@hcl-software/domino-rest-sdk-node)

> **Note:** As of v0.2.1, Domino REST API Node.js SDK is ESM-only.

## 📔 Documentation

- [Domino REST API documentation](https://opensource.hcltechsw.com/Domino-rest-api/index.html)
Expand Down Expand Up @@ -47,20 +49,12 @@ npm install @hcl-software/domino-rest-sdk-node
You can import the whole SDK via:

```javascript
// Using Node.js `require()`
const drapiSdk = require('@hcl-software/domino-rest-sdk-node');

// Using ES6 imports
import drapiSdk from '@hcl-software/domino-rest-sdk-node';
import * as drapiSdk from '@hcl-software/domino-rest-sdk-node';
```

Or, you can import only the modules that you need, like:

```javascript
// Using Node.js `require()`
const { DominoAccess } = require('@hcl-software/domino-rest-sdk-node');

// Using ES6 imports
import { DominoAccess } from '@hcl-software/domino-rest-sdk-node';
```

Expand Down
13 changes: 3 additions & 10 deletions fixup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
# Apache-2.0 license https://www.apache.org/licenses/LICENSE-2.0 #
# ========================================================================== #

if [ -d dist/cjs/ ]; then
cat >dist/cjs/package.json <<!EOF
{
"type": "commonjs"
}
!EOF
fi

if [ -d dist/esm/ ]; then
cat >dist/esm/package.json <<!EOF
if [ -d dist/ ]; then
cat >dist/package.json <<!EOF
{
"main": "index.js",
"type": "module"
}
!EOF
Expand Down
Loading