Skip to content

Commit

Permalink
0.0.4 - Add "type": "module" and "exports" to package.json for ESM co…
Browse files Browse the repository at this point in the history
…mpatibility
  • Loading branch information
ain1084 committed Nov 1, 2024
1 parent e607da5 commit bc961b8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.4] - 2024-11-02

### Added

- Added `"type": "module"` to `package.json` to define the package as ESM-only.
- Added `"exports"` field to `package.json` to specify the entry point explicitly for ESM compatibility.

### Changed

- Updated `clean` script to `rm -rf ./dist docs` for consistency in paths.

## [0.0.3] - 2024-10-26

### Added
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ console.log(views.data.buffer.byteLength); // 4104

## API

For detailed API documentation, please refer to the [GitHub Pages](https://ain1084.github.io/array-buffer-partitioner/) documentation.

### `createArrayBufferViews(BufferType: { new(size: number): ArrayBuffer | SharedArrayBuffer }, config: Record<string, [TypedArrayConstructor, number]>)`

Creates multiple `TypedArray` views on a single `ArrayBuffer` or `SharedArrayBuffer`.
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "@ain1084/array-buffer-partitioner",
"version": "0.0.3",
"version": "0.0.4",
"description": "Partition an ArrayBuffer into multiple TypedArray views efficiently.",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"exports": {
".": "./dist/index.js"
},
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc",
"clean": "rm -rf dist docs",
"clean": "rm -rf ./dist docs",
"prepublishOnly": "npm run clean && npm run build",
"test": "jest",
"test:watch": "jest --watch",
Expand Down Expand Up @@ -41,7 +44,7 @@
"@types/jest": "^29.5.14",
"jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typedoc": "^0.26.10",
"typedoc": "^0.26.11",
"typescript": "^5.6.3"
}
}

0 comments on commit bc961b8

Please sign in to comment.