mirror of
https://github.com/cupcakearmy/occulto.git
synced 2024-12-22 07: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: '',
|
basePath: '',
|
||||||
files: [
|
files: [
|
||||||
{ pattern: 'node_modules/chai/chai.js', type: 'module' },
|
{ pattern: 'node_modules/chai/chai.js', type: 'module' },
|
||||||
{ pattern: 'dist/esm/**/*.js', type: 'module' },
|
{ pattern: 'dist/**/*.js', type: 'module' },
|
||||||
{ pattern: 'test/**/*.js', type: 'module' },
|
{ pattern: 'test/**/*.js', type: 'module' },
|
||||||
],
|
],
|
||||||
|
|
||||||
|
13
package.json
13
package.json
@ -21,12 +21,11 @@
|
|||||||
"pnpm": "7"
|
"pnpm": "7"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "./dist/esm/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/esm/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"import": "./dist/esm/index.js",
|
"import": "./dist/index.js"
|
||||||
"require": "./dist/cjs/index.cjs"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
@ -37,12 +36,10 @@
|
|||||||
"test:node": "mocha",
|
"test:node": "mocha",
|
||||||
"test:browser": "karma start .karma.cjs --single-run",
|
"test:browser": "karma start .karma.cjs --single-run",
|
||||||
"test": "run-s build test:*",
|
"test": "run-s build test:*",
|
||||||
"build:esm": "tsc -p tsconfig.esm.json",
|
"build": "tsc",
|
||||||
"build:cjs": "tsc -p tsconfig.cjs.json && ./rename.sh",
|
|
||||||
"build": "run-s clean build:*",
|
|
||||||
"clean": "rm -rf ./dist",
|
"clean": "rm -rf ./dist",
|
||||||
"dev": "run-p -ln dev:*",
|
"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:node": "mocha --parallel --watch",
|
||||||
"dev:test:browser": "karma start .karma.cjs",
|
"dev:test:browser": "karma start .karma.cjs",
|
||||||
"prepublishOnly": "run-s clean build"
|
"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'
|
import { Precomputed } from './values.js'
|
||||||
|
|
||||||
describe('AES', () => {
|
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'
|
import { Precomputed } from './values.js'
|
||||||
|
|
||||||
describe('Encoding', () => {
|
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'
|
import { Precomputed } from './values.js'
|
||||||
|
|
||||||
describe('Hash', () => {
|
describe('Hash', () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getRandomBytes } from '../dist/esm/index.js'
|
import { getRandomBytes } from '../dist/index.js'
|
||||||
import { Promises } from './utils.js'
|
import { Promises } from './utils.js'
|
||||||
|
|
||||||
describe('Random', () => {
|
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 { Promises } from './utils.js'
|
||||||
import { Precomputed } from './values.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