Skip to content

Commit bc961b8

Browse files
committed
0.0.4 - Add "type": "module" and "exports" to package.json for ESM compatibility
1 parent e607da5 commit bc961b8

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
44

55
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).
66

7+
## [0.0.4] - 2024-11-02
8+
9+
### Added
10+
11+
- Added `"type": "module"` to `package.json` to define the package as ESM-only.
12+
- Added `"exports"` field to `package.json` to specify the entry point explicitly for ESM compatibility.
13+
14+
### Changed
15+
16+
- Updated `clean` script to `rm -rf ./dist docs` for consistency in paths.
17+
718
## [0.0.3] - 2024-10-26
819

920
### Added

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ console.log(views.data.buffer.byteLength); // 4104
4747

4848
## API
4949

50+
For detailed API documentation, please refer to the [GitHub Pages](https://ain1084.github.io/array-buffer-partitioner/) documentation.
51+
5052
### `createArrayBufferViews(BufferType: { new(size: number): ArrayBuffer | SharedArrayBuffer }, config: Record<string, [TypedArrayConstructor, number]>)`
5153

5254
Creates multiple `TypedArray` views on a single `ArrayBuffer` or `SharedArrayBuffer`.

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"name": "@ain1084/array-buffer-partitioner",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "Partition an ArrayBuffer into multiple TypedArray views efficiently.",
5-
"module": "dist/index.js",
6-
"types": "dist/index.d.ts",
5+
"type": "module",
6+
"exports": {
7+
".": "./dist/index.js"
8+
},
9+
"types": "./dist/index.d.ts",
710
"scripts": {
811
"build": "tsc",
9-
"clean": "rm -rf dist docs",
12+
"clean": "rm -rf ./dist docs",
1013
"prepublishOnly": "npm run clean && npm run build",
1114
"test": "jest",
1215
"test:watch": "jest --watch",
@@ -41,7 +44,7 @@
4144
"@types/jest": "^29.5.14",
4245
"jest": "^29.0.0",
4346
"ts-jest": "^29.2.5",
44-
"typedoc": "^0.26.10",
47+
"typedoc": "^0.26.11",
4548
"typescript": "^5.6.3"
4649
}
4750
}

0 commit comments

Comments
 (0)