Skip to content

Commit

Permalink
Released v5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Jun 16, 2018
1 parent 48d6bfe commit f0e5ed5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 26 deletions.
2 changes: 1 addition & 1 deletion HISTORY.md
@@ -1,6 +1,6 @@
# History

## not yet released, version 5.0.0
## 2018-06-16, version 5.0.0

!!! BE CAREFUL: BREAKING CHANGES !!!

Expand Down
20 changes: 3 additions & 17 deletions misc/how_to_publish.md
Expand Up @@ -14,11 +14,11 @@ Update the date and version number in the file HISTORY.md. Verify whether all
changes in the new version are described.


## Build library
## Build and test

Build the distribution files ./dist/math.js and ./dist/math.min.js by running:
Build the distribution files in folders `dist` and `lib`, and test everything by running:

npm run build
npm run build-and-test

After the build is complete, verify if the files are created and contain the
correct date and version number in the header.
Expand All @@ -27,20 +27,6 @@ Check whether there are new markdown files generated in `./docs` and add if
so add them to git.


## Test

Test whether the library works correctly by running the tests:

npm test

Test whether the npm library is ok by installing it locally:

cd ../tmp-folder
npm install ../mathjs

Check whether the library works and looks ok.


## Commit

- Commit the final code.
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "mathjs",
"version": "4.4.2",
"version": "5.0.0",
"description": "Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types like numbers, big numbers, complex numbers, fractions, units, and matrices.",
"author": "Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)",
"contributors": [
Expand Down Expand Up @@ -158,7 +158,7 @@
],
"scripts": {
"build": "gulp",
"build-and-test": "npm run build && npm run test:dist",
"build-and-test": "npm run build && npm run test:src && npm run test:dist && npm run lint",
"compile": "gulp compile",
"watch": "gulp watch",
"docs": "gulp docs",
Expand All @@ -169,7 +169,7 @@
"test:browser": "karma start ./browser-test-config/local-karma.js",
"test:browserstack": "karma start ./browser-test-config/browserstack-karma.js",
"coverage": "nyc --reporter=lcov --reporter=text-summary mocha test test-node --recursive --require babel-core/register; echo \"\nDetailed coverage report is available at ./coverage/lcov-report/index.html\"",
"prepublishOnly": "npm test && npm run build-and-test"
"prepublishOnly": "npm run build-and-test"
},
"bin": {
"mathjs": "./bin/cli.js"
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
@@ -1,3 +1,3 @@
module.exports = '4.4.2'
module.exports = '5.0.0'
// Note: This file is automatically generated when building math.js.
// Changes made in this file will be overwritten.
5 changes: 5 additions & 0 deletions test-dist/lib.test.js
Expand Up @@ -6,6 +6,11 @@ describe('lib', function () {
const math = require('../lib/main')

assert.equal(math.add(2, 3), 5)
})

it('should have the correct version number', function () {
const math = require('../lib/main')

assert.equal(math.version, version)
})
})
4 changes: 0 additions & 4 deletions test/constants.test.js
Expand Up @@ -139,10 +139,6 @@ describe('constants', function () {
assert.strictEqual(math['null'], null)
})

it('should have version number', function () {
assert.equal(math.version, require('../package.json').version)
})

it('should return message when uninitialized', function () {
assert.equal(math.uninitialized, 'Error: Constant uninitialized is removed since v4.0.0. Use null instead')
})
Expand Down

0 comments on commit f0e5ed5

Please sign in to comment.