diff --git a/.gitattributes b/.gitattributes
index 10a16e6..1c88e69 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -40,10 +40,27 @@
*.mov binary
# Override what is considered "vendored" by GitHub's linguist:
-/deps/** linguist-vendored=false
-/lib/node_modules/** linguist-vendored=false linguist-generated=false
-test/fixtures/** linguist-vendored=false
-tools/** linguist-vendored=false
+/lib/node_modules/** -linguist-vendored -linguist-generated
-# Override what is considered "documentation" by GitHub's linguist:
-examples/** linguist-documentation=false
+# Configure directories which should *not* be included in GitHub language statistics:
+/deps/** linguist-vendored
+/dist/** linguist-generated
+/workshops/** linguist-vendored
+
+benchmark/** linguist-vendored
+docs/* linguist-documentation
+etc/** linguist-vendored
+examples/** linguist-documentation
+scripts/** linguist-vendored
+test/** linguist-vendored
+tools/** linguist-vendored
+
+# Configure files which should *not* be included in GitHub language statistics:
+Makefile linguist-vendored
+*.mk linguist-vendored
+*.jl linguist-vendored
+*.py linguist-vendored
+*.R linguist-vendored
+
+# Configure files which should be included in GitHub language statistics:
+docs/types/*.d.ts -linguist-documentation
diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml
index ec90164..f4575e9 100644
--- a/.github/workflows/productionize.yml
+++ b/.github/workflows/productionize.yml
@@ -94,8 +94,8 @@ jobs:
node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );"
fi
- # Configure git:
- - name: 'Configure git'
+ # Configure Git:
+ - name: 'Configure Git'
run: |
git config --local user.email "noreply@stdlib.io"
git config --local user.name "stdlib-bot"
@@ -191,8 +191,8 @@ jobs:
# Pin action to full length commit SHA
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- # Configure git:
- - name: 'Configure git'
+ # Configure Git:
+ - name: 'Configure Git'
run: |
git config --local user.email "noreply@stdlib.io"
git config --local user.name "stdlib-bot"
@@ -344,7 +344,6 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
@@ -367,8 +366,8 @@ jobs:
# Pin action to full length commit SHA
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- # Configure git:
- - name: 'Configure git'
+ # Configure Git:
+ - name: 'Configure Git'
run: |
git config --local user.email "noreply@stdlib.io"
git config --local user.name "stdlib-bot"
@@ -518,7 +517,6 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
@@ -541,8 +539,8 @@ jobs:
# Pin action to full length commit SHA
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- # Configure git:
- - name: 'Configure git'
+ # Configure Git:
+ - name: 'Configure Git'
run: |
git config --local user.email "noreply@stdlib.io"
git config --local user.name "stdlib-bot"
@@ -698,7 +696,6 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
@@ -738,8 +735,8 @@ jobs:
echo "bump=true" >> $GITHUB_OUTPUT
fi
- # Configure git:
- - name: 'Configure git'
+ # Configure Git:
+ - name: 'Configure Git'
if: steps.check-if-bump.outputs.bump
run: |
git config --local user.email "noreply@stdlib.io"
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 3eec50e..2888b88 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -72,8 +72,8 @@ jobs:
node-version: 20
timeout-minutes: 5
- # Configure git:
- - name: 'Configure git'
+ # Configure Git:
+ - name: 'Configure Git'
run: |
git config --local user.email "noreply@stdlib.io"
git config --local user.name "stdlib-bot"
@@ -94,6 +94,10 @@ jobs:
# Replace branch in README.md link definitions for badges with the new version:
find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/branch([=:])[^ ]+/branch\1v${NEW_VERSION}/g"
+ # Rewrite CHANGELOG.md to replace "Unreleased" with the new version:
+ sed -Ei "s/Unreleased/${NEW_VERSION}/g" CHANGELOG.md
+ sed -Ei "s/unreleased/v${NEW_VERSION}/g" CHANGELOG.md
+
# Create a new commit and tag:
git add package.json README.md
git commit -m "Release v${NEW_VERSION}"
@@ -202,7 +206,7 @@ jobs:
# Publish package to npm:
- name: 'Publish package to npm'
# Pin action to full length commit SHA
- uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552 # v3.0.1
+ uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
@@ -218,7 +222,6 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0cae5f3..378c82b 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -95,6 +95,5 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
diff --git a/.github/workflows/test_bundles.yml b/.github/workflows/test_bundles.yml
index 6d77abd..5b5879a 100644
--- a/.github/workflows/test_bundles.yml
+++ b/.github/workflows/test_bundles.yml
@@ -94,7 +94,6 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
@@ -139,7 +138,6 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
@@ -184,6 +182,5 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml
index f4eda1e..2bcf0cd 100644
--- a/.github/workflows/test_coverage.yml
+++ b/.github/workflows/test_coverage.yml
@@ -119,7 +119,6 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml
index ee35156..61adcd3 100644
--- a/.github/workflows/test_install.yml
+++ b/.github/workflows/test_install.yml
@@ -81,6 +81,5 @@ jobs:
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
- steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
diff --git a/.gitignore b/.gitignore
index 49b206b..4fdc97c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -101,6 +101,8 @@ docs/**/node_modules/
pids
*.pid
*.seed
+yarn.lock
+package-lock.json
# Typescript #
##############
diff --git a/.npmrc b/.npmrc
index 5af9067..58dbd10 100644
--- a/.npmrc
+++ b/.npmrc
@@ -27,5 +27,5 @@ shrinkwrap = false
# Disable automatically "saving" dependencies on install:
save = false
-# Generate provenance metadata:
-provenance = true
+# Do not generate provenance metadata:
+provenance = false
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 794c786..fc29526 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,4 +2,224 @@
> Package changelog.
-See [GitHub Releases](https://github.com/stdlib-js/utils-circular-buffer/releases) for the changelog.
\ No newline at end of file
+
+
+## Unreleased (2024-09-07)
+
+
+
+### Commits
+
+
+
+- [`8edb71d`](https://github.com/stdlib-js/stdlib/commit/8edb71d3f64bdf44f51c35e24cfce3ff9932f844) - **test:** add tests to `utils/circular-buffer` _(by Karthik Prakash, Philipp Burckhardt, Athan Reines)_
+- [`32bbcb3`](https://github.com/stdlib-js/stdlib/commit/32bbcb3b3dae1f028fd18166ee7875a93d44d0ee) - **refactor:** update paths _(by Athan Reines)_
+- [`ed9c0a5`](https://github.com/stdlib-js/stdlib/commit/ed9c0a5e55ff09af3dd6af8c38615480e2c1828e) - **refactor:** update paths _(by Athan Reines)_
+- [`75d4f83`](https://github.com/stdlib-js/stdlib/commit/75d4f83cb85610d23a04dc21a03f8075f6d3665f) - **refactor:** update require and include paths _(by Athan Reines)_
+
+
+
+
+
+
+
+
+
+### Contributors
+
+A total of 3 people contributed to this release. Thank you to the following contributors:
+
+- Athan Reines
+- Karthik Prakash
+- Philipp Burckhardt
+
+
+
+
+
+
+
+
+
+
+
+## 0.2.1 (2024-02-25)
+
+No changes reported for this release.
+
+
+
+
+
+
+
+## 0.2.0 (2024-02-15)
+
+
+
+### Commits
+
+
+
+- [`9502ed2`](https://github.com/stdlib-js/stdlib/commit/9502ed27e2853e312c556a48bdd7775095e66709) - **build:** replace tslint directive with eslint equivalent _(by Philipp Burckhardt)_
+
+
+
+
+
+
+
+
+
+### Contributors
+
+A total of 1 person contributed to this release. Thank you to this contributor:
+
+- Philipp Burckhardt
+
+
+
+
+
+
+
+
+
+
+
+## 0.1.0 (2023-09-24)
+
+
+
+### Features
+
+- [`ace728f`](https://github.com/stdlib-js/stdlib/commit/ace728f330033182c28199dc9e13d75eda18cfe0) - update minimum TypeScript version
+
+
+
+
+
+
+
+### Bug Fixes
+
+- [`cb8dd54`](https://github.com/stdlib-js/stdlib/commit/cb8dd5415c30229fa3eb70ef8669323eea8922a0) - update import path for `Collection` type definition and improve types
+
+
+
+
+
+
+
+### BREAKING CHANGES
+
+- [`ace728f`](https://github.com/stdlib-js/stdlib/commit/ace728f330033182c28199dc9e13d75eda18cfe0): update minimum TypeScript version to 4.1
+
+ - To migrate, users should upgrade their TypeScript version to at least version 4.1.
+
+
+
+
+
+
+
+### Commits
+
+
+
+- [`ace728f`](https://github.com/stdlib-js/stdlib/commit/ace728f330033182c28199dc9e13d75eda18cfe0) - **feat:** update minimum TypeScript version _(by Philipp Burckhardt)_
+- [`cb8dd54`](https://github.com/stdlib-js/stdlib/commit/cb8dd5415c30229fa3eb70ef8669323eea8922a0) - **fix:** update import path for `Collection` type definition and improve types _(by Athan Reines)_
+
+
+
+
+
+
+
+
+
+### Contributors
+
+A total of 2 people contributed to this release. Thank you to the following contributors:
+
+- Athan Reines
+- Philipp Burckhardt
+
+
+
+
+
+
+
+
+
+
+
+## 0.0.7 (2022-02-16)
+
+No changes reported for this release.
+
+
+
+
+
+
+
+## 0.0.6 (2021-08-22)
+
+No changes reported for this release.
+
+
+
+
+
+
+
+## 0.0.5 (2021-07-07)
+
+No changes reported for this release.
+
+
+
+
+
+
+
+## 0.0.4 (2021-06-27)
+
+No changes reported for this release.
+
+
+
+
+
+
+
+## 0.0.3 (2021-06-16)
+
+No changes reported for this release.
+
+
+
+
+
+
+
+## 0.0.2 (2021-06-15)
+
+No changes reported for this release.
+
+
+
+
+
+
+
+## 0.0.1 (2021-06-14)
+
+No changes reported for this release.
+
+
+
+
+
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 4500383..0d81958 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -5,6 +5,7 @@
Adarsh Palaskar
Aditya Sapra
AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
+Aleksandr <112382387+alextes90@users.noreply.github.com>
Ali Salesi
Aman Bhansali
Amit Jimiwal
@@ -18,13 +19,16 @@ Chinmay Joshi <86140365+JawHawk@users.noreply.github.com>
Christopher Dambamuromo
Dan Rose
Daniel Killenberger
+Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
Dominik Moritz
Dorrin Sotoudeh
EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com>
Frank Kovacs
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
Gunj Joshi
+HarshaNP <96897754+GittyHarsha@users.noreply.github.com>
Harshita Kalani
+Hridyanshu <124202756+HRIDYANSHU054@users.noreply.github.com>
Jaimin Godhani <112328542+Jai0401@users.noreply.github.com>
James Gelok
Jaysukh Makvana
@@ -43,11 +47,13 @@ Marcus Fantham
Matt Cochrane
Mihir Pandit <129577900+MSP20086@users.noreply.github.com>
Milan Raj
+Mohammad Kaif <98884589+Kaif987@users.noreply.github.com>
Momtchil Momtchev
Muhammad Haris
Naresh Jagadeesan
NightKnight
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
+Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com>
Ognjen Jevremović
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
Philipp Burckhardt
@@ -60,17 +66,22 @@ Pushpendra Chandravanshi
Raunak Kumar Gupta
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Ricky Reusser
+Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
Robert Gislason
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
Rutam <138517416+performant23@users.noreply.github.com>
Ryan Seal
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
+SarthakPaandey <145528240+SarthakPaandey@users.noreply.github.com>
Seyyed Parsa Neshaei
Shashank Shekhar Singh
Shivam <11shivam00@gmail.com>
Shraddheya Shendre
+Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
Shubham Mishra
-Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com>
+Sivam Das <100067002+Sivam2313@users.noreply.github.com>
+Snehil Shah
+Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
Spandan Barve
Stephannie Jiménez Gacha
Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com>
@@ -79,8 +90,11 @@ Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
Utkarsh
Utkarsh Raj
Varad Gupta
+Xiaochuan Ye
Yernar Yergaziyev
naveen
nishant-s7 <97207366+nishant-s7@users.noreply.github.com>
orimiles5 <97595296+orimiles5@users.noreply.github.com>
+rainn <88160429+AmCodesLame@users.noreply.github.com>
rei2hu
+yaswanth <116426380+yaswanthkosuru@users.noreply.github.com>
diff --git a/docs/types/test.ts b/docs/types/test.ts
index a5f1f9a..bf7827c 100644
--- a/docs/types/test.ts
+++ b/docs/types/test.ts
@@ -29,6 +29,9 @@ import CircularBuffer = require( './index' );
// The function returns a circular buffer instance...
{
new CircularBuffer( 3 ); // $ExpectType CircularBuffer
+ new CircularBuffer( [ 1, 2, 3 ] ); // $ExpectType CircularBuffer
+ new CircularBuffer( 'abc' ); // $ExpectType CircularBuffer
+ new CircularBuffer( { 'length': 10 } ); // $ExpectType CircularBuffer
}
// The compiler throws an error if the constructor function is provided an invalid number of arguments...
@@ -36,3 +39,13 @@ import CircularBuffer = require( './index' );
new CircularBuffer(); // $ExpectError
new CircularBuffer( 3, 4 ); // $ExpectError
}
+
+// The compiler throws an error if the constructor function is provided a first argument which is not a number or an array-like object...
+{
+ new CircularBuffer( true ); // $ExpectError
+ new CircularBuffer( false ); // $ExpectError
+ new CircularBuffer( null ); // $ExpectError
+ new CircularBuffer( undefined ); // $ExpectError
+ new CircularBuffer( {} ); // $ExpectError
+ new CircularBuffer( ( x: number ): number => x ); // $ExpectError
+}
diff --git a/package.json b/package.json
index ee3a6c4..f2eef0a 100644
--- a/package.json
+++ b/package.json
@@ -38,29 +38,29 @@
},
"dependencies": {
"@stdlib/array-base-arraylike2object": "^0.2.1",
- "@stdlib/assert-is-collection": "^0.2.1",
- "@stdlib/assert-is-nonnegative-integer": "^0.2.1",
- "@stdlib/assert-is-positive-integer": "^0.2.1",
- "@stdlib/constants-float64-max": "^0.2.1",
- "@stdlib/string-format": "^0.2.1",
- "@stdlib/symbol-iterator": "^0.2.1",
- "@stdlib/types": "^0.3.2",
- "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.2.2",
- "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1",
- "@stdlib/error-tools-fmtprodmsg": "^0.2.1"
+ "@stdlib/assert-is-collection": "^0.2.2",
+ "@stdlib/assert-is-nonnegative-integer": "^0.2.2",
+ "@stdlib/assert-is-positive-integer": "^0.2.2",
+ "@stdlib/constants-float64-max": "^0.2.2",
+ "@stdlib/string-format": "^0.2.2",
+ "@stdlib/symbol-iterator": "^0.2.2",
+ "@stdlib/types": "^0.4.1",
+ "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.2.3",
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2",
+ "@stdlib/error-tools-fmtprodmsg": "^0.2.2"
},
"devDependencies": {
- "@stdlib/array-complex128": "^0.2.1",
- "@stdlib/assert-instance-of": "^0.2.1",
- "@stdlib/complex-float64": "^0.2.1",
- "@stdlib/complex-imag": "^0.2.1",
- "@stdlib/complex-real": "^0.2.1",
+ "@stdlib/array-complex128": "^0.3.0",
+ "@stdlib/assert-instance-of": "^0.2.2",
+ "@stdlib/complex-float64-ctor": "^0.0.3",
+ "@stdlib/complex-float64-imag": "^0.1.1",
+ "@stdlib/complex-float64-real": "^0.1.1",
"@stdlib/random-base-randu": "^0.2.1",
"proxyquire": "^2.0.0",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
"istanbul": "^0.4.1",
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",
- "@stdlib/bench-harness": "^0.2.1"
+ "@stdlib/bench-harness": "^0.2.2"
},
"engines": {
"node": ">=0.10.0",
diff --git a/test/test.js b/test/test.js
index 09750e8..1af14eb 100644
--- a/test/test.js
+++ b/test/test.js
@@ -24,9 +24,9 @@ var tape = require( 'tape' );
var proxyquire = require( 'proxyquire' );
var instanceOf = require( '@stdlib/assert-instance-of' );
var Complex128Array = require( '@stdlib/array-complex128' );
-var Complex128 = require( '@stdlib/complex-float64' );
-var real = require( '@stdlib/complex-real' );
-var imag = require( '@stdlib/complex-imag' );
+var Complex128 = require( '@stdlib/complex-float64-ctor' );
+var real = require( '@stdlib/complex-float64-real' );
+var imag = require( '@stdlib/complex-float64-imag' );
var iteratorSymbol = require( '@stdlib/symbol-iterator' );
var CircularBuffer = require( './../lib' );