feat(ses-ava)!: Update packaging for RESM/NESM bridge
BREAKING CHANGE: No longer supports direct use from CommonJS
MODIFY
packages/ses-ava/NEWS.md
packages/ses-ava/NEWS.md
@@ -2,9 +2,11 @@ User-visible changes in SES-Ava
## Next Release
-- *BREAKING*: Removes compatibility layer for UMD and CommonJS consumers.
- Supporting both Node.js ESM and the `node -r esm` shim requires
- the main entry point module to be ESM regardless of environment.
+* *BREAKING*: Removes CommonJS and UMD downgrade compatibility.
+ Supporting both Node.js ESM and the `node -r esm` shim requires the main
+ entry point module to be ESM regardless of environment.
+ UMD and CommonJS facets will likely return after all dependees have migrated
+ away from depending upon the `esm` JavaScript module emulator.
* Expose internal `package.json` through Node.js ESM `exports` for the benefit
of `svelte` tooling.

ADD
packages/ses-ava/index.d.ts
+export { wrapTest } from './index.js';

ADD
packages/ses-ava/index.js
+export { wrapTest } from './src/ses-ava-test.js';

MODIFY
packages/ses-ava/jsconfig.json
packages/ses-ava/jsconfig.json
{
"compilerOptions": {
- "target": "es2020",
+ "target": "esnext",
"module": "esnext",
"noEmit": true,
"downlevelIteration": true,
"strictNullChecks": true,
"moduleResolution": "node"
},
- "include": ["src/**/*.js"]
+ "include": ["src/**/*.js", "index.d.ts"]
}

MODIFY
packages/ses-ava/package.json
packages/ses-ava/package.json
"name": "@agoric/ses-ava",
"version": "0.1.1+1-dev",
"description": "Virtualize Ava's test to work better under SES.",
+ "keywords": ["ses", "ava"],
"author": "Agoric",
"license": "Apache-2.0",
+ "homepage": "https://github.com/endojs/endo/tree/master/packages/ses-ava#readme",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/endojs/endo.git"
+ },
+ "bugs": {
+ "url": "https://github.com/endojs/endo/issues"
+ },
"type": "module",
- "main": "./src/main.js",
+ "main": "./index.js",
+ "types": "./index.d.ts",
"exports": {
"./package.json": "./package.json",
- ".": {
- "import": "./src/main.js"
- }
+ ".": "./index.js"
},
"scripts": {
+ "build": "exit 0",
"lint": "yarn lint:types && yarn lint:js",
- "lint:types": "tsc --build jsconfig.json",
- "lint:js": "eslint '**/*.js'",
"lint-fix": "eslint --fix '**/*.js'",
- "test": "yarn ava"
+ "lint:js": "eslint '**/*.js'",
+ "lint:types": "tsc --build jsconfig.json",
+ "test": "ava"
},
"dependencies": {
"ses": "^0.12.7"
},
"devDependencies": {
"@agoric/eslint-config": "^0.3.6",
- "@rollup/plugin-commonjs": "^13.0.0",
- "@rollup/plugin-node-resolve": "^6.1.0",
- "@rollup/plugin-json": "^4.1.0",
"ava": "^3.12.1",
+ "babel-eslint": "^10.0.3",
+ "eslint": "^7.23.0",
+ "eslint-config-airbnb-base": "^14.0.0",
+ "eslint-config-prettier": "^6.9.0",
+ "eslint-plugin-eslint-comments": "^3.1.2",
+ "eslint-plugin-import": "^2.19.1",
+ "eslint-plugin-prettier": "^3.1.2",
"prettier": "^1.19.1",
- "rollup-plugin-terser": "^5.1.3"
+ "typescript": "^4.0.5"
},
- "ava": {
"files": [
- "*test*/**/test-*.js"
+ "LICENSE*",
+ "exported.js",
+ "index.d.ts",
+ "index.js",
+ "src"
],
- "require": []
+ "publishConfig": {
+ "access": "public"
},
"eslintConfig": {
"extends": [
"trailingComma": "all",
"singleQuote": true
},
+ "ava": {
"files": [
- "LICENSE*",
- "src",
- "exported.js"
+ "test/**/test-*.js"
],
- "publishConfig": {
- "access": "public"
+ "timeout": "2m"
}
}

DELETE
packages/ses-ava/src/main.js
-export { wrapTest } from './ses-ava-test.js';

feat(ses-ava)!: Update packaging for RESM/NESM bridge

BREAKING CHANGE: No longer supports direct use from CommonJS