@unchainedshop/core-events 1.1.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/jest.config.js ADDED
@@ -0,0 +1,5 @@
1
+ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
2
+ export default {
3
+ preset: 'ts-jest',
4
+ testEnvironment: 'node',
5
+ };
package/package.json CHANGED
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "name": "@unchainedshop/core-events",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "main": "lib/events-index.js",
5
+ "exports": {
6
+ ".": "./lib/events-index.js",
7
+ "./*": "./lib/*"
8
+ },
5
9
  "types": "lib/events-index.d.ts",
6
10
  "type": "module",
7
11
  "scripts": {
12
+ "prepublishOnly": "npm install && npm run build || :",
8
13
  "clean": "rm -rf lib",
9
- "build": "npm run clean && tsc -p tsconfig.build.json",
10
- "watch": "tsc --watch",
11
- "link:core": "npm link @unchainedshop/types",
12
- "test": "cross-env METEOR_PACKAGE_DIRS=../ TEST_CLIENT=0 TEST_WATCH=1 meteor test-packages ./ --driver-package meteortesting:mocha --port 4212"
14
+ "build": "npm run clean && tsc",
15
+ "watch": "tsc -w",
16
+ "test": "jest --watch"
13
17
  },
14
18
  "repository": {
15
19
  "type": "git",
@@ -27,21 +31,17 @@
27
31
  },
28
32
  "homepage": "https://github.com/unchainedshop/unchained#readme",
29
33
  "dependencies": {
30
- "@unchainedshop/utils": "1.1.3",
34
+ "@unchainedshop/events": "^1.1.9",
35
+ "@unchainedshop/utils": "^1.1.9",
31
36
  "simpl-schema": "^1.12.2"
32
37
  },
33
- "peerDependencies": {
34
- "@unchainedshop/events": "1.1.3"
35
- },
36
38
  "devDependencies": {
37
- "@types/chai": "^4.3.1",
38
- "@types/mocha": "^9.1.1",
39
- "@unchainedshop/events": "1.1.3",
40
- "@unchainedshop/types": "^1.1.2",
41
- "chai": "^4.3.6",
42
- "cross-env": "^7.0.3",
39
+ "@types/node": "^16.11.44",
40
+ "@unchainedshop/types": "^1.1.9",
43
41
  "isomorphic-unfetch": "^3.1.0",
44
- "mongodb": "^4.4.1",
42
+ "jest": "^28.1.2",
43
+ "mongodb": "^4.7.0",
44
+ "ts-jest": "^28.0.5",
45
45
  "typescript": "^4.7.4"
46
46
  }
47
47
  }
@@ -1,5 +1,5 @@
1
1
  import { assert } from 'chai';
2
- import { initDb } from 'meteor/unchained:mongodb';
2
+ import { initDb } from '@unchainedshop/mongodb';
3
3
  import { configureEventsModule } from '@unchainedshop/events';
4
4
  import { emit, registerEvents, getEmitHistoryAdapter } from '@unchainedshop/events';
5
5
 
package/tsconfig.json CHANGED
@@ -1,8 +1,29 @@
1
1
  {
2
- "extends": "./tsconfig.build.json",
3
2
  "compilerOptions": {
4
- "noEmit": true,
5
- "types": ["node", "mocha"]
3
+ "allowJs": true,
4
+ "allowSyntheticDefaultImports": true,
5
+ "declaration": true,
6
+ "esModuleInterop": true,
7
+ "experimentalDecorators": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "lib": [
10
+ "esnext"
11
+ ],
12
+ "module": "esnext",
13
+ "moduleResolution": "node",
14
+ "noImplicitReturns": true,
15
+ "noUnusedLocals": false,
16
+ "outDir": "lib",
17
+ "preserveWatchOutput": true,
18
+ "skipLibCheck": true,
19
+ "sourceMap": true,
20
+ "target": "esnext",
21
+ "types": [
22
+ "node",
23
+ "jest"
24
+ ]
6
25
  },
7
- "include": ["src", "tests"]
8
- }
26
+ "include": [
27
+ "src"
28
+ ]
29
+ }
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowJs": true,
4
- "allowSyntheticDefaultImports": true,
5
- "declaration": true,
6
- "esModuleInterop": true,
7
- "experimentalDecorators": true,
8
- "forceConsistentCasingInFileNames": true,
9
- "lib": ["esnext"],
10
- "module": "esnext",
11
- "moduleResolution": "node",
12
- "noImplicitReturns": true,
13
- "noUnusedLocals": false,
14
- "outDir": "lib",
15
- "preserveWatchOutput": true,
16
- "skipLibCheck": true,
17
- "sourceMap": true,
18
- "target": "esnext",
19
- "types": ["node"],
20
- "baseUrl": ".", // This must be specified if "paths" is.
21
- "paths": {
22
- "meteor/unchained:*": ["node_modules/@unchainedshop/types/index.d.ts"]
23
- }
24
- },
25
- "include": ["src"]
26
- }