New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mathjslab

Package Overview
Dependencies
Maintainers
0
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mathjslab - npm Package Compare versions

Comparing version 1.5.11 to 1.5.12

12

CHANGES.md

@@ -5,4 +5,14 @@ # Release notes

## 1.5.12
- Some changes in 'README.md' file (links to mathjslab.com).
- Exclude eslint and jest config from build ('tsconfig.build.json' file).
- Improvements to the 'webpack.config.ts' file to setup
`configuration.mode = argv.mode`. Webpack configuration was hardcoded as
a factory.
- The 'eslint.config.js' file has been changed to include more granular rules
for the 'script' directory and configuration files.
## 1.5.11
- Domain setup (mathjslab.com). Set as "homepage" in 'package.json' file. Some changes in 'README.md' file.
- Domain setup (mathjslab.com). Set as "homepage" in 'package.json' file. Some
changes in 'README.md' file.

@@ -9,0 +19,0 @@ ## 1.5.10

9

eslint.config.js

@@ -0,1 +1,6 @@

/**
* eslint.config.js: ESLint configuration.
*/
// @ts-nocheck
const globals = require('globals');

@@ -27,3 +32,3 @@ const tsPlugin = require('@typescript-eslint/eslint-plugin');

},
ignores: ['eslint.config.js', 'jest.config.js', 'res/**', 'lib/**', 'src/MathJSLabLexer.ts', 'src/MathJSLabParser.ts'],
ignores: ['eslint.config.*', 'jest.config.*', 'webpack.config.*', '**/*.spec.*', 'res/**', 'lib/**', 'src/MathJSLabLexer.ts', 'src/MathJSLabParser.ts'],
rules: {

@@ -48,3 +53,3 @@ ...tsPlugin.configs['eslint-recommended'].rules,

{
files: ['script/**/*.ts'],
files: ['script/**/*.ts', 'eslint.config.*', 'jest.config.*', 'webpack.config.*', '**/*.spec.*'],
languageOptions: {

@@ -51,0 +56,0 @@ parser: tsParser,

@@ -0,10 +1,16 @@

/**
* jest.config.js: Jest configuration.
*/
// @ts-nocheck
module.exports = {
preset: 'ts-jest',
moduleFileExtensions: ['js', 'json', 'ts'],
moduleFileExtensions: ['ts', 'js', 'json'],
rootDir: '.',
testRegex: '.*\\.spec\\.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
'^.+\\.[tj]s$': 'ts-jest',
},
testEnvironment: 'node',
};

@@ -8,1 +8,9 @@ /*!

*/
/*!
* decimal.js v10.4.3
* An arbitrary-precision Decimal type for JavaScript.
* https://github.com/MikeMcl/decimal.js
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
* MIT Licence
*/
{
"name": "mathjslab",
"version": "1.5.11",
"version": "1.5.12",
"description": "MathJSLab - An interpreter with language syntax like MATLAB®/Octave. ISBN 978-65-00-82338-7",

@@ -38,2 +38,3 @@ "main": "lib/mathjslab.js",

"clean": "npm run clean:resources && npm run clean:parser && npm run clean:build",
"clean:all": "npm run clean && npm run clean:package-lock",
"update": "npx ncu -u && npm install && npm run build:resources",

@@ -51,2 +52,3 @@ "git:add": "git add .",

"test": "jest --verbose",
"pretest:watch": "npm run build:parser",
"test:watch": "jest --watch",

@@ -57,3 +59,3 @@ "tsx": "tsx --require tsconfig-paths/register",

"prebuild": "npm run build:parser",
"build": "webpack --mode production",
"build": "tsx --require tsconfig-paths/register ./node_modules/webpack/bin/webpack --mode production",
"postbuild": "npm run clean:antlr:tokens:interp",

@@ -67,6 +69,2 @@ "do:all": "npm run clean && npm run update && npm run format:lint && npm run build && npm run add:commit:push:publish"

},
"dependencies": {
"antlr4": "^4.13.2",
"decimal.js": "^10.4.3"
},
"devDependencies": {

@@ -76,8 +74,8 @@ "@types/debug": "^4.1.12",

"@types/jest": "29.5.13",
"@types/node": "^22.5.5",
"@types/node": "^22.7.3",
"@types/supertest": "^6.0.2",
"@types/webpack": "^5.28.5",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"eslint": "^9.11.0",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",

@@ -93,9 +91,12 @@ "eslint-plugin-import": "^2.30.0",

"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsx": "^4.19.1",
"typescript": "^5.6.2",
"webpack": "^5.94.0",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"antlr4": "^4.13.2",
"decimal.js": "^10.4.3"
}
}
<p align="center">
<img src="mathjslab-logo.svg" alt="logo" width="200" height="200">
<a href="https://mathjslab.com/" target="_blank" rel="noopener"><img src="mathjslab-logo.svg" alt="logo" width="200" height="200" /></a>
</p>
# MathJSLab - [mathjslab.com](https://mathjslab.com/)
# [MathJSLab](https://mathjslab.com/) - [mathjslab.com](https://mathjslab.com/)

@@ -54,9 +54,9 @@ [![npm version](https://img.shields.io/npm/v/mathjslab)](https://www.npmjs.com/package/mathjslab)

- Is easily extensible through configuration parameters passed to Evaluator constructor.
- [Open source](https://en.wikipedia.org/wiki/Open-source_software) with fully documented code.
- [Open source](https://en.wikipedia.org/wiki/Open-source_software) with fully documented code: [MIT License](https://opensource.org/license/mit).
- Includes test suite using [Jest](https://jestjs.io/).
- Improved demo [Web application](https://en.wikipedia.org/wiki/Web_application) at project page: [mathjslab.com](https://mathjslab.com/).
- Improved demo [Web application](https://en.wikipedia.org/wiki/Web_application) at project page: [mathjslab.com](https://mathjslab.com/) ([repository](https://github.com/sergiolindau/mathjslab-calculator)).
## Browser support
**MathJSLab** works on any [ES2015](https://262.ecma-international.org/6.0/) compatible
[MathJSLab](https://mathjslab.com/) works on any [ES2015](https://262.ecma-international.org/6.0/) compatible
[JavaScript](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/)

@@ -80,5 +80,5 @@ engine, including [Node.js&reg;](https://nodejs.org/),

The basic API is an instantiation of `Evaluator` with optional configuration.
The basic [API](https://en.wikipedia.org/wiki/API) is an instantiation of `Evaluator` class with optional configuration.
Import **MathJSLab API**:
Import **[MathJSLab](https://mathjslab.com/) [API](https://en.wikipedia.org/wiki/API)**:

@@ -92,3 +92,3 @@ ```typescript

```typescript
let evaluator = new Evaluator(EvaluatorConfiguration);
let evaluator: Evaluator = new Evaluator(EvaluatorConfiguration);
```

@@ -100,3 +100,3 @@

```typescript
let input = evaluator.Parse('x=sqrt(1+2*3)');
let input: AST.NodeInput = evaluator.Parse('x=sqrt(1+2*3)');
```

@@ -106,3 +106,3 @@

```typescript
let result = evaluator.Evaluate(input);
let result: AST.NodeInput = evaluator.Evaluate(input);
```

@@ -112,4 +112,4 @@

```typescript
let mathmlInput = evaluator.UnparseMathML(input);
let mathmlResult = evaluator.UnparseMathML(result);
let mathmlInput: string = evaluator.UnparseMathML(input);
let mathmlResult: string = evaluator.UnparseMathML(result);
```

@@ -120,3 +120,3 @@

You can optimize your application, reducing the size of your bundle, loading
**MathJSLab** via the [UNPKG](https://www.unpkg.com/) [CDN](https://en.wikipedia.org/wiki/Content_delivery_network).
[MathJSLab](https://mathjslab.com/) via the [UNPKG](https://www.unpkg.com/) [CDN](https://en.wikipedia.org/wiki/Content_delivery_network).

@@ -155,7 +155,6 @@ ```html

```bash
npm install
npm run update
```
This will install the dependencies, update all of them, and download the latest version of ANTLR, preparing any resources needed to build the project.
This will update the dependencies, install all of them, and download the latest version of ANTLR, preparing any resources needed to build the project.

@@ -178,5 +177,6 @@ Run the `mathjslab` tests:

There are some differences from the original [MATLAB&reg;](https://www.mathworks.com/)/[Octave](https://www.gnu.org/software/octave/). The main difference is
that there are only one a complex numeric type. Other implemented types is
boolean, character string, structure and function handle.
There are some differences from the original
[MATLAB&reg;](https://www.mathworks.com/)/[Octave](https://www.gnu.org/software/octave/).
The main difference is that there are only one a complex numeric type. Other
implemented types is boolean, character string, structure and function handle.

@@ -183,0 +183,0 @@ Common arrays (not only cell arrays) can hold any type of element.

{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "webpack.config.ts", "res", "script", "lib", "**/*spec.ts"]
"exclude": ["node_modules", "eslint.config.*", "jest.config.*", "webpack.config.*", "**/*spec.ts", "lib", "res", "script"]
}

@@ -14,3 +14,3 @@ {

/* Language and Environment */
"target": "es2015" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"target": "ES2015" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */

@@ -31,3 +31,3 @@ // "jsx": "react", /* Specify what JSX code is generated. */

"rootDir": "./" /* Specify the root folder within your source files. */,
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
"moduleResolution": "Node" /* Specify how TypeScript looks up a file from a given module specifier. */,
"baseUrl": "./" /* Specify the base directory to resolve non-relative module names. */,

@@ -34,0 +34,0 @@ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */

@@ -0,36 +1,43 @@

/**
* webpack.config.ts: Webpack configuration factory.
*/
import path from 'node:path';
import webpack from 'webpack';
const config: webpack.Configuration = {
entry: './src/lib.ts',
module: {
rules: [
{
test: /\.[tj]s$/,
use: [
{
loader: 'ts-loader',
options: {
configFile: 'tsconfig.build.json',
export default (env: any, argv: any): webpack.Configuration => {
console.warn('webpack.config.ts: Building production bundle.');
console.table(env);
return {
mode: argv.mode,
entry: './src/lib.ts',
module: {
rules: [
{
test: /\.[tj]s$/,
use: [
{
loader: 'ts-loader',
options: {
configFile: 'tsconfig.build.json',
},
},
},
],
exclude: [/node_modules/, /.*\.spec\.[tj]s/],
],
exclude: [/node_modules/, /lib/, /res/, /script/, /.*\.spec\.[tj]s/],
},
],
},
resolve: {
extensions: ['.ts', '.js'],
},
output: {
path: path.resolve(__dirname, 'lib'),
filename: 'mathjslab.js',
library: {
name: 'mathjslab',
type: 'umd',
},
],
},
resolve: {
extensions: ['.ts', '.js'],
},
output: {
path: path.resolve(__dirname, 'lib'),
filename: 'mathjslab.js',
library: {
name: 'mathjslab',
type: 'umd',
clean: true,
},
clean: true,
},
};
};
export default config;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc