mirror of
https://github.com/cupcakearmy/occulto.git
synced 2024-12-21 16:56:30 +00:00
drop support for commonjs
This commit is contained in:
parent
dbc5bf97d9
commit
91605aa434
@ -7,7 +7,7 @@ module.exports = function (config) {
|
||||
basePath: '',
|
||||
files: [
|
||||
{ pattern: 'node_modules/chai/chai.js', type: 'module' },
|
||||
{ pattern: 'dist/esm/**/*.js', type: 'module' },
|
||||
{ pattern: 'dist/**/*.js', type: 'module' },
|
||||
{ pattern: 'test/**/*.js', type: 'module' },
|
||||
],
|
||||
|
||||
|
13
package.json
13
package.json
@ -21,12 +21,11 @@
|
||||
"pnpm": "7"
|
||||
},
|
||||
"type": "module",
|
||||
"types": "./dist/esm/index.d.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/esm/index.d.ts",
|
||||
"import": "./dist/esm/index.js",
|
||||
"require": "./dist/cjs/index.cjs"
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
@ -37,12 +36,10 @@
|
||||
"test:node": "mocha",
|
||||
"test:browser": "karma start .karma.cjs --single-run",
|
||||
"test": "run-s build test:*",
|
||||
"build:esm": "tsc -p tsconfig.esm.json",
|
||||
"build:cjs": "tsc -p tsconfig.cjs.json && ./rename.sh",
|
||||
"build": "run-s clean build:*",
|
||||
"build": "tsc",
|
||||
"clean": "rm -rf ./dist",
|
||||
"dev": "run-p -ln dev:*",
|
||||
"dev:build": "tsc -w -p tsconfig.esm.json",
|
||||
"dev:build": "tsc -w",
|
||||
"dev:test:node": "mocha --parallel --watch",
|
||||
"dev:test:browser": "karma start .karma.cjs",
|
||||
"prepublishOnly": "run-s clean build"
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Rename .js files to .cjs
|
||||
rename -S .js .cjs dist/cjs/**/*
|
||||
sed -i '' 's/\.js"/\.cjs"/g' dist/cjs/**/*.cjs
|
@ -1,4 +1,4 @@
|
||||
import { AES, Bytes, Hashes, Hex } from '../dist/esm/index.js'
|
||||
import { AES, Bytes, Hashes, Hex } from '../dist/index.js'
|
||||
import { Precomputed } from './values.js'
|
||||
|
||||
describe('AES', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Base64, Bytes } from '../dist/esm/index.js'
|
||||
import { Base64, Bytes } from '../dist/index.js'
|
||||
import { Precomputed } from './values.js'
|
||||
|
||||
describe('Encoding', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Bytes, Hash, Hashes, Hex } from '../dist/esm/index.js'
|
||||
import { Bytes, Hash, Hashes, Hex } from '../dist/index.js'
|
||||
import { Precomputed } from './values.js'
|
||||
|
||||
describe('Hash', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { getRandomBytes } from '../dist/esm/index.js'
|
||||
import { getRandomBytes } from '../dist/index.js'
|
||||
import { Promises } from './utils.js'
|
||||
|
||||
describe('Random', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Bytes, RSA } from '../dist/esm/index.js'
|
||||
import { Bytes, RSA } from '../dist/index.js'
|
||||
import { Promises } from './utils.js'
|
||||
import { Precomputed } from './values.js'
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"target": "ES2015",
|
||||
"outDir": "dist/cjs"
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "ES2015",
|
||||
"target": "ES2015",
|
||||
"outDir": "dist/esm"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user