Skip to content
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
15 changes: 3 additions & 12 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,12 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 15.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [20.x, 22.x]

steps:
# - uses: actions/checkout@v2
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.node-version }}
# - run: npm ci
# - run: npm run build --if-present
# - run: npm test
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to npm

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Build
run: npm run build
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ bower_components
*.DS_Store
.nyc_output
build
coverage
coverage
.parcel-cache/
34 changes: 20 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,73 @@
# Changelog

### [0.17.35](https://github.com/grimmer0125/numjs/compare/v0.17.34...v0.17.35) (2026-03-07)
### [0.17.35](https://github.com/grimmerk/numjs/compare/v0.17.34...v0.17.35) (2026-03-07)

- Allow scalar numbers for both arguments in `multiply` and `divide` functions (#14, thanks @pppp606)
- Upgrade Parcel to 2.16, TypeScript to >=4.9.5 (including 5.x), @types/node to ^20
- Fix Parcel CDN bundle for browser (polyfill `buffer`, shim `util`)
- Fix ESM build: add `.js` extensions to relative imports via post-build script
- Update CI to Node 20.x/22.x and actions v4
- Add `workflow_dispatch` publish workflow for manual npm publish
- Set minimum Node.js version to 20

### [0.17.34](https://github.com/grimmer0125/numjs/compare/v0.17.32...v0.17.34) (2021-11-22)
### [0.17.34](https://github.com/grimmerk/numjs/compare/v0.17.32...v0.17.34) (2021-11-22)

- Improve exported nj as a default export module instead of nj object for better IDE intelligence
### [0.17.32](https://github.com/grimmer0125/numjs/compare/v0.17.30...v0.17.32) (2021-11-21)
### [0.17.32](https://github.com/grimmerk/numjs/compare/v0.17.30...v0.17.32) (2021-11-21)

- Define DType instead of DataType.
- Make codes compatible latest @types/ndarray.
- Improve NdArray constructor typings.

### [0.17.30](https://github.com/grimmer0125/numjs/compare/v0.17.28...v0.17.30) (2021-11-20)
### [0.17.30](https://github.com/grimmerk/numjs/compare/v0.17.28...v0.17.30) (2021-11-20)

- Use DataType instead of string for dtype autocomplete.
- Fix some tpyo dtype "int" in unit tests and README.

### [0.17.28](https://github.com/grimmer0125/numjs/compare/v0.17.25...v0.17.28) (2021-11-20)
### [0.17.28](https://github.com/grimmerk/numjs/compare/v0.17.25...v0.17.28) (2021-11-20)

- Improve NdArray constructor parameter typing.

- Improve documentation.

### [0.17.25](https://github.com/grimmer0125/numjs/compare/v0.17.19...v0.17.25) (2021-11-20)
### [0.17.25](https://github.com/grimmerk/numjs/compare/v0.17.19...v0.17.25) (2021-11-20)

- Fix wrong internal ndarray container when using TypedArray in nj.array #9

- Improve documentation.

### [0.17.19](https://github.com/grimmer0125/numjs/compare/v0.17.16...v0.17.19) (2021-11-12)
### [0.17.19](https://github.com/grimmerk/numjs/compare/v0.17.16...v0.17.19) (2021-11-12)

- Add CDN parcel build.
### [0.17.16](https://github.com/grimmer0125/numjs/compare/v0.17.14...v0.17.16) (2021-11-11)
### [0.17.16](https://github.com/grimmerk/numjs/compare/v0.17.14...v0.17.16) (2021-11-11)

- Improve documentation.
- Remove lodash dependency.

### [0.17.14](https://github.com/grimmer0125/numjs/compare/v0.17.11...v0.17.14) (2021-11-10)
### [0.17.14](https://github.com/grimmerk/numjs/compare/v0.17.11...v0.17.14) (2021-11-10)

- Improve a little documentation and typings.
- Rename nj.uint8_clamped to nj.uint8Clamped

### [0.17.11](https://github.com/grimmer0125/numjs/compare/v0.17.10...v0.17.11) (2021-11-09)
### [0.17.11](https://github.com/grimmerk/numjs/compare/v0.17.10...v0.17.11) (2021-11-09)

Fix nj.array and nj.int8, nj.int16...nj.uint8_clamped parameter typings.

### [0.17.10](https://github.com/grimmer0125/numjs/compare/v0.17.0...v0.17.10) (2021-11-09)
### [0.17.10](https://github.com/grimmerk/numjs/compare/v0.17.0...v0.17.10) (2021-11-09)

- Improve documentation.
- Improve typings (mainly concatenate return type and dtype ArrayLikeConstructor).
- Add data container "uint8_clamped" / Uint8ClampedArray support (experimental).
### [0.17.0](https://github.com/grimmer0125/numjs/compare/v0.16.0.1...v0.17.0) (2021-11-08)
### [0.17.0](https://github.com/grimmerk/numjs/compare/v0.16.0.1...v0.17.0) (2021-11-08)

- Remove image manipulation which may cause mac m1 installation failure, also it may be not needed in some use cases.
- Add TypeScript and typing for parameters and return value.
- Use ES6 syntax: const/let, and class and `import`
- Remove karma tests
- Building results can be used by `require (commonjs)` and es6 `import`, including TypeScript typing. Use https://github.com/bitjson/typescript-starter to build instead of grunt. Also, it ships with a main.js, and a javascript tree-shakable javascript module.
- Remove `expect.js` and use built-in chai test api (`expect().to.throw()`) instead.
- Fix rot90 missing ndim comparison bug, [commit](https://github.com/grimmer0125/numjs/pull/4/commits/dbf70845cbb784748fbc16d87bfb69b47053f7c2)
- Fix rot90 missing ndim comparison bug, [commit](https://github.com/grimmerk/numjs/pull/4/commits/dbf70845cbb784748fbc16d87bfb69b47053f7c2)
- Fix inspect log part using util.inspect.custom on Node.js
- Add Istanbul nyc coverage
- Use yarn stead
- Fix function return type, [commit](https://github.com/grimmer0125/numjs/pull/4/commits/d77f2a0788353f4680ec0befd3b974969d8524d2)
- Fix function return type, [commit](https://github.com/grimmerk/numjs/pull/4/commits/d77f2a0788353f4680ec0befd3b974969d8524d2)
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @d4c/numjs

[![npm version](https://img.shields.io/npm/v/%40d4c/numjs.svg)](https://www.npmjs.com/package/@d4c/numjs) ![example workflow](https://github.com/grimmer0125/numjs/actions/workflows/node.js.yml/badge.svg)
[![npm version](https://img.shields.io/npm/v/%40d4c/numjs.svg)](https://www.npmjs.com/package/@d4c/numjs) ![example workflow](https://github.com/grimmerk/numjs/actions/workflows/node.js.yml/badge.svg)

> **Maintenance Status:** This project is in **passive maintenance** mode — critical bug fixes and small improvements may be accepted, but no active feature development is planned.
>
Expand All @@ -21,7 +21,7 @@ This project is modified from https://github.com/nicolaspanel/numjs and does bel
- Add "uint8_clamped" (Uint8ClampedArray) support.
- Other improvements.

You can check the [changelog](https://github.com/grimmer0125/numjs/blob/master/CHANGELOG.md).
You can check the [changelog](https://github.com/grimmerk/numjs/blob/master/CHANGELOG.md).

## Features

Expand All @@ -34,9 +34,9 @@ Besides its obvious scientific uses, __NumJs__ can also be used as an efficient

It works both in node.js and in the browser.

__NumJs__ is licensed under the [MIT license](https://github.com/grimmer0125/numjs/blob/master/LICENSE), enabling reuse with almost no restrictions.
__NumJs__ is licensed under the [MIT license](https://github.com/grimmerk/numjs/blob/master/LICENSE), enabling reuse with almost no restrictions.

Try this [jsfiddle](https://jsfiddle.net/grimmer0125/8jft09q3) to play around with the library.
Try this [jsfiddle](https://jsfiddle.net/grimmerk/8jft09q3) to play around with the library.
## Installation

```sh
Expand Down Expand Up @@ -738,6 +738,6 @@ Thanks to the following people for their contributions:
- [@pppp606](https://github.com/pppp606) — scalar support for `multiply` and `divide` ([#14](https://github.com/grimmerk/numjs/pull/14))

## Documentation
- [@d4c/numjs](https://grimmer0125.github.io/numjs/)
- [numjs module (nj) doc](https://grimmer0125.github.io/numjs/modules/)
- [NdArray doc](https://grimmer0125.github.io/numjs/classes/ndarray.NdArray.html)
- [@d4c/numjs](https://grimmerk.github.io/numjs/)
- [numjs module (nj) doc](https://grimmerk.github.io/numjs/modules/)
- [NdArray doc](https://grimmerk.github.io/numjs/classes/ndarray.NdArray.html)
Loading