forked from benfred/venn.js
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from upsetjs/release/v2.0.0
Release v2.0.0
- Loading branch information
Showing
46 changed files
with
4,781 additions
and
6,980 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
target-branch: develop | ||
schedule: | ||
interval: 'daily' | ||
# Maintain dependencies for npm | ||
# - package-ecosystem: 'npm' | ||
# directory: '/' | ||
# target-branch: develop | ||
# schedule: | ||
# interval: 'daily' | ||
interval: 'monthly' | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
target-branch: develop | ||
schedule: | ||
interval: 'monthly' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'enhancement' | ||
- 'feature' | ||
- title: '🐛 Bugs Fixes' | ||
labels: | ||
- 'bug' | ||
- title: 'Documentation' | ||
labels: | ||
- 'documentation' | ||
- title: '🧰 Development' | ||
labels: | ||
- 'chore' | ||
change-template: '- #$NUMBER $TITLE' | ||
change-title-escapes: '\<*_&`#@' | ||
template: | | ||
$CHANGES | ||
Thanks to $CONTRIBUTORS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Create Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
versionName: | ||
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major, prepatch, preminor, premajor, prerelease)' | ||
required: true | ||
default: patch | ||
preid: | ||
description: 'Pre Release Identifier (i.e., alpha, beta)' | ||
required: true | ||
default: alpha | ||
jobs: | ||
create_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} | ||
- name: Reset main branch | ||
run: | | ||
git fetch origin dev:dev | ||
git reset --hard origin/dev | ||
- name: Change version number | ||
id: version | ||
run: | | ||
echo "next_tag=$(npm version --no-git-tag-version ${{ github.event.inputs.versionName }} --preid ${{ github.event.inputs.preid }})" >> $GITHUB_OUTPUT | ||
- name: Create pull request into main | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
branch: release/${{ steps.version.outputs.next_tag }} | ||
commit-message: 'chore: release ${{ steps.version.outputs.next_tag }}' | ||
base: main | ||
title: Release ${{ steps.version.outputs.next_tag }} | ||
labels: chore | ||
assignees: sgratzl | ||
body: | | ||
Releasing ${{ steps.version.outputs.next_tag }}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Release Helper | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
correct_repository: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: fail on fork | ||
if: github.repository_owner != 'sgratzl' | ||
run: exit 1 | ||
|
||
create_release: | ||
needs: correct_repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Extract version | ||
id: extract_version | ||
run: | | ||
node -pe "'version=' + require('./package.json').version" >> $GITHUB_OUTPUT | ||
node -pe "'npm_tag=' + (require('./package.json').version.includes('-') ? 'next' : 'latest')" >> $GITHUB_OUTPUT | ||
- name: Print version | ||
run: | | ||
echo "releasing ${{ steps.extract_version.outputs.version }} with tag ${{ steps.extract_version.outputs.npm_tag }}" | ||
- name: Create Release | ||
id: create_release | ||
uses: release-drafter/release-drafter@v6 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: v${{ steps.extract_version.outputs.version }} | ||
tag: v${{ steps.extract_version.outputs.version }} | ||
version: ${{ steps.extract_version.outputs.version }} | ||
prerelease: ${{ needs.create_release.outputs.tag_name == 'next' }} | ||
publish: true | ||
outputs: | ||
version: ${{ steps.extract_version.outputs.version }} | ||
npm_tag: ${{ steps.extract_version.outputs.npm_tag }} | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
tag_name: ${{ steps.create_release.outputs.tag_name }} | ||
|
||
build_assets: | ||
needs: create_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: npm i -g yarn | ||
- run: yarn config set checksumBehavior ignore | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
./.yarn/cache | ||
./.yarn/unplugged | ||
key: ${{ runner.os }}-yarn2-v5-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn2-v5 | ||
- run: yarn install | ||
- run: yarn build | ||
- run: yarn pack | ||
- name: Upload Release Asset | ||
uses: AButler/[email protected] | ||
with: | ||
files: 'package.tgz' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
release-tag: ${{ needs.create_release.outputs.tag_name }} | ||
- name: Pack Publish | ||
run: | | ||
yarn config set npmAuthToken "${{ secrets.NPM_TOKEN }}" | ||
yarn pack | ||
yarn npm publish --tag "${{ needs.create_release.outputs.npm_tag }}" | ||
sync_dev: | ||
needs: correct_repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: develop | ||
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} | ||
- name: Reset dev branch | ||
run: | | ||
git fetch origin main:main | ||
git merge main | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.pnp.js | ||
.pnp.* | ||
.yarnrc.yml | ||
.yarn |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
diff --git a/build/fmin.js b/build/fmin.js | ||
index da5504ab16463811c1aff42ac0458ca6b7378d28..506ceefaef866275ea1f48b34384fd99756ba042 100644 | ||
--- a/build/fmin.js | ||
+++ b/build/fmin.js | ||
@@ -209,7 +209,7 @@ | ||
if (sigma >= 1) break; | ||
|
||
// do a reduction | ||
- for (i = 1; i < simplex.length; ++i) { | ||
+ for (let i = 1; i < simplex.length; ++i) { | ||
weightedSum(simplex[i], 1 - sigma, simplex[0], sigma, simplex[i]); | ||
simplex[i].fx = f(simplex[i]); | ||
} | ||
diff --git a/package.json b/package.json | ||
index 9378ea45918a9879f0daf01b5742416cb84fd774..5d9e373425655c66193e5c490b8be5d09349225a 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -2,7 +2,6 @@ | ||
"name": "fmin", | ||
"version": "0.0.4", | ||
"description": "Unconstrained funcion minimization in Javascript", | ||
- "type": "module", | ||
"keywords": [ | ||
"fmin", | ||
"optimization", | ||
@@ -11,6 +10,7 @@ | ||
], | ||
"license": "BSD-3-Clause", | ||
"main": "build/fmin.js", | ||
+ "module": "index.js", | ||
"jsnext:main": "index", | ||
"homepage": "https://github.com/benfred/fmin", | ||
"repository": { | ||
diff --git a/src/nelderMead.js b/src/nelderMead.js | ||
index fe38e9104920d7cf77156b53f627855796b5a225..1cc99b6ff81c489f622fbea354b40759fe9e8445 100644 | ||
--- a/src/nelderMead.js | ||
+++ b/src/nelderMead.js | ||
@@ -129,7 +129,7 @@ export function nelderMead(f, x0, parameters) { | ||
if (sigma >= 1) break; | ||
|
||
// do a reduction | ||
- for (i = 1; i < simplex.length; ++i) { | ||
+ for (let i = 1; i < simplex.length; ++i) { | ||
weightedSum(simplex[i], 1 - sigma, simplex[0], sigma, simplex[i]); | ||
simplex[i].fx = f(simplex[i]); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.