diff --git a/.editorconfig b/.editorconfig index c66ad55..2900add 100644 --- a/.editorconfig +++ b/.editorconfig @@ -29,74 +29,92 @@ trim_trailing_whitespace = true insert_final_newline = true # Set properties for JavaScript files: -[*.js] +[*.{js,js.txt}] indent_style = tab +# Set properties for JavaScript ES module files: +[*.{mjs,mjs.txt}] +indent_style = tab + +# Set properties for JavaScript CommonJS files: +[*.{cjs,cjs.txt}] +indent_style = tab + +# Set properties for JSON files: +[*.{json,json.txt}] +indent_style = space +indent_size = 2 + # Set properties for TypeScript files: [*.ts] indent_style = tab # Set properties for Python files: -[*.py] +[*.{py,py.txt}] indent_style = space indent_size = 4 # Set properties for Julia files: -[*.jl] +[*.{jl,jl.txt}] indent_style = tab # Set properties for R files: -[*.R] +[*.{R,R.txt}] indent_style = tab # Set properties for C files: -[*.c] +[*.{c,c.txt}] indent_style = tab # Set properties for C header files: -[*.h] +[*.{h,h.txt}] indent_style = tab # Set properties for C++ files: -[*.cpp] +[*.{cpp,cpp.txt}] indent_style = tab # Set properties for C++ header files: -[*.hpp] +[*.{hpp,hpp.txt}] indent_style = tab # Set properties for Fortran files: -[*.f] +[*.{f,f.txt}] indent_style = space indent_size = 2 insert_final_newline = false # Set properties for shell files: -[*.sh] +[*.{sh,sh.txt}] indent_style = tab # Set properties for AWK files: -[*.awk] +[*.{awk,awk.txt}] indent_style = tab # Set properties for HTML files: -[*.html] +[*.{html,html.txt}] +indent_style = tab +tab_width = 2 + +# Set properties for XML files: +[*.{xml,xml.txt}] indent_style = tab tab_width = 2 # Set properties for CSS files: -[*.css] +[*.{css,css.txt}] indent_style = tab # Set properties for Makefiles: [Makefile] indent_style = tab -[*.mk] +[*.{mk,mk.txt}] indent_style = tab # Set properties for Markdown files: -[*.md] +[*.{md,md.txt}] indent_style = space indent_size = 4 trim_trailing_whitespace = false @@ -112,7 +130,7 @@ indent_style = space indent_size = 4 # Set properties for `package.json` files: -[package.json] +[package.{json,json.txt}] indent_style = space indent_size = 2 @@ -121,6 +139,11 @@ indent_size = 2 indent_style = space indent_size = 2 +# Set properties for `manifest.json` files: +[manifest.json] +indent_style = space +indent_size = 2 + # Set properties for `tslint.json` files: [tslint.json] indent_style = space @@ -132,15 +155,15 @@ indent_style = space indent_size = 2 # Set properties for LaTeX files: -[*.tex] +[*.{tex,tex.txt}] indent_style = tab # Set properties for LaTeX Bibliography files: -[*.bib] +[*.{bib,bib.txt}] indent_style = tab # Set properties for YAML files: -[*.yml] +[*.{yml,yml.txt}] indent_style = space indent_size = 2 diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 121f657..fccb4c2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -29,12 +29,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: 15 + node-version: 16 + timeout-minutes: 5 - name: Install production and development dependencies run: | npm install || npm install || npm install + timeout-minutes: 15 - name: Run benchmarks run: | npm run benchmark diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 881e209..be2d812 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -29,12 +29,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: 15 + node-version: 16 + timeout-minutes: 5 - name: Install production and development dependencies run: | npm install || npm install || npm install + timeout-minutes: 15 - name: Run examples run: | npm run examples diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ac43d57..bcf6ed8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,7 +20,9 @@ name: Publish Package # Workflow triggers: -on: push +on: + push: + tags: v[0-9]+.[0-9]+.[0-9]+ # Workflow jobs: jobs: @@ -30,23 +32,24 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: 15 - - name: Increment version + node-version: 16 + timeout-minutes: 5 + - name: Replace all GitHub links to individual packages with npm links run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - npm version patch + find . -type f -name '*.md' -print0 | xargs -0 sed -Ei 's/@stdlib\/([^:]*)\]: https:\/\/github.com\/stdlib-js/@stdlib\/\1\]: https:\/\/www.npmjs.com\/package\/@stdlib/g' + - name: Replace all stdlib GitHub dependencies with the respective npm packages + run: | + find package.json -type f -print0 | xargs -0 sed -Ei 's/"github:stdlib-js[^"]*"/"^0.0.x"/g' - name: Publish package to npm uses: JS-DevTools/npm-publish@v1 with: token: ${{ secrets.NPM_TOKEN }} access: public - - name: Push changes + - name: Discard any uncommitted changes run: | - git push origin main - git push --tags + git reset --hard - uses: act10ns/slack@v1 with: status: ${{ job.status }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 087cebd..3d3cfc5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,7 @@ on: # * is a special character in YAML so you have to quote this string - cron: '30 1 * * 6' workflow_dispatch: + push: # Workflow jobs: jobs: @@ -34,13 +35,15 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: 15 + node-version: 16 + timeout-minutes: 5 - name: Install production and development dependencies id: install run: | npm install || npm install || npm install + timeout-minutes: 15 - name: Run tests id: tests run: | diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index dfcf102..ae56523 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -32,15 +32,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: 15 + node-version: 16 + timeout-minutes: 5 - name: Install production and development dependencies run: | npm install || npm install || npm install + timeout-minutes: 15 - name: Calculate test coverage run: | npm run test-cov || npm run test-cov || npm run test-cov + timeout-minutes: 15 - name: Upload coverage to Codecov id: upload uses: codecov/codecov-action@v1 diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index ed16345..0bb1900 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -36,13 +36,15 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 with: - node-version: 15 + node-version: 16 + timeout-minutes: 5 - name: Install production dependencies via npm run: | npm install --only=prod || npm install --only=prod || npm install --only=prod + timeout-minutes: 15 - uses: act10ns/slack@v1 with: status: ${{ job.status }} diff --git a/.gitignore b/.gitignore index 1475963..db2ca48 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ # Files # ######### -.postinstall.json +package.json.copy # Directories # ############### @@ -70,9 +70,6 @@ tmp/ *.tar *.zip -# Make an exception for compressed distributable files: -!dist/*.gz - # Logs and databases # ###################### *.log diff --git a/.npmignore b/.npmignore index fb7a83d..8c24fa0 100644 --- a/.npmignore +++ b/.npmignore @@ -36,6 +36,7 @@ Makefile **/examples/ reports/ support/ +scripts/ **/tmp/ workshops/ diff --git a/package.json b/package.json index dd6bcdc..21a9cef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stdlib/math-iter-special-havercos", - "version": "0.0.4", + "version": "0.0.5", "description": "Create an iterator which computes the half-value versed cosine for each iterated value.", "license": "Apache-2.0", "author": {