diff --git a/package.json b/package.json index 4074985..ea675c2 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { "name": "@uci-utils/type", - "version": "0.5.1", + "version": "0.6.1", "description": "A variable type check and casting utility - extension of typechecker package plus type casting", - "main": "src/", + "main": "src/index.js", + "type": "module", "scripts": { - "test": "./node_modules/.bin/mocha -r esm --timeout 30000", - "testd": "UCI_ENV=dev ./node_modules/.bin/nodemon --exec './node_modules/.bin/mocha -r esm --timeout 30000' || exit 0", + "test": "./node_modules/.bin/mocha --timeout 30000", + "testd": "UCI_ENV=dev ./node_modules/.bin/nodemon --exec './node_modules/.bin/mocha --timeout 30000' || exit 0", "testdd": "UCI_LOG_LEVEL='trace' npm run testd", "testde": "UCI_LOG_LEVEL='warn' npm run testd", "testl": "UCI_ENV=pro UCI_LOG_PATH=./test/test.log 0 npm run test || exit 0" @@ -30,13 +31,12 @@ }, "homepage": "https://github.com/uCOMmandIt/uci-utils#readme", "dependencies": { - "@uci-utils/to-boolean": "^0.1.5", - "typechecker": "^6.3.0" + "@uci-utils/to-boolean": "^0.2.0", + "typechecker": "^7.17.0" }, "devDependencies": { - "chai": "^4.2.0", - "esm": "^3.2.25", - "mocha": "^7.1.0", - "nodemon": "^2.0.2" + "chai": "^4.3.4", + "mocha": "^8.3.2", + "nodemon": "^2.0.7" } } diff --git a/src/index.js b/src/index.js index ad9f198..7d79991 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ // import { cast, typecast, } from './cast' -import check from './check' +import check from './check.js' -export * from './cast' -export { check, typeOf } from './check' +export * from './cast.js' +export { check, typeOf } from './check.js' export default check // default is just the typechecker only diff --git a/test/cast.test.js b/test/cast.test.js index 8d42874..fc3142d 100644 --- a/test/cast.test.js +++ b/test/cast.test.js @@ -1,5 +1,5 @@ import assert from 'assert' -import { check, typecast, cast, toString, toBoolean } from '../src' +import { check, typecast, cast, toString, toBoolean } from '../src/index.js' console.log(typecast.boolean) console.log(toBoolean) diff --git a/test/check.test.js b/test/check.test.js index 2e6200f..0180696 100644 --- a/test/check.test.js +++ b/test/check.test.js @@ -1,5 +1,5 @@ import { expect } from 'chai' -import u, {typeOf} from '../src' +import u, {typeOf} from '../src/index.js' describe('Type Check Library - ', function () {