@es-joy/jsoe 0.4.0 → 0.4.2

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/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGES TO `@es-joy/jsoe`
2
2
 
3
+ ## 0.4.2
4
+
5
+ - fix: TS types
6
+
7
+ ## 0.4.1
8
+
9
+ - fix: add `main`
10
+
3
11
  ## 0.4.0
4
12
 
5
13
  - feat: TypeScript types
@@ -1 +1 @@
1
- {"version":3,"file":"arrayType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/arrayType.js"],"names":[],"mappings":";sBAUa,MAAM;;oCAQN,MAAM,gBAAgB,EAAE;sCAIxB,gBAAgB,EAAE;qCAKlB,IAAI;4BAGJ,MAAM,cAAc,GAAG;IACnC,sBAA0B,EAAE,qBAAqB,CAAC;IAClD,kBAAsB,EAAE,iBAAiB,CAAC;IAC1C,iBAAqB,EAAE,gBAAgB,CAAA;CACpC;uBAGS,MAAM,QAAQ,IAAI,CAAC;2BAKrB;IAAC,WAAW,CAAC,EAAE,IAAI,CAAA;CAAC,KAClB,IAAI;+BAIJ,MAAM,gBAAgB,GAAC,SAAS;AAtC7C;;GAEG;AACH;;;;GAIG;AACH;;GAEG;AACH;;;GAGG;AAEH;;;GAGG;AACH;;;;;;GAMG;AACH;;GAEG;AAEH;;;;GAIG;AAEH;;GAEG;AAEH;;GAEG;AACH,yBAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,MAAM,CAAC,EAAE,OAAO,GAAC,SAAS,CAAA;CAAC,CA60CvE"}
1
+ {"version":3,"file":"arrayType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/arrayType.js"],"names":[],"mappings":";sBAUa,MAAM;;oCAQN,MAAM,gBAAgB,EAAE;sCAIxB,gBAAgB,EAAE;qCAKlB,IAAI;4BAGJ,MAAM,cAAc,GAAG;IACnC,sBAA0B,EAAE,qBAAqB,CAAC;IAClD,kBAAsB,EAAE,iBAAiB,CAAC;IAC1C,iBAAqB,EAAE,gBAAgB,CAAA;CACpC;uBAGS,MAAM,QAAQ,IAAI,CAAC;2BAKrB;IAAC,WAAW,CAAC,EAAE,IAAI,CAAA;CAAC,KAClB,IAAI;+BAIJ,MAAM,gBAAgB,GAAC,SAAS;AAtC7C;;GAEG;AACH;;;;GAIG;AACH;;GAEG;AACH;;;GAGG;AAEH;;;GAGG;AACH;;;;;;GAMG;AACH;;GAEG;AAEH;;;;GAIG;AAEH;;GAEG;AAEH;;GAEG;AACH,yBAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,MAAM,CAAC,EAAE,OAAO,GAAC,SAAS,CAAA;CAAC,CA20CvE"}
package/package.json CHANGED
@@ -1,12 +1,40 @@
1
1
  {
2
2
  "name": "@es-joy/jsoe",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
+ "main": "./src/index.js",
6
7
  "exports": {
7
- ".": "./src/index.js"
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./src/index.js"
11
+ }
8
12
  },
9
13
  "description": "Editing of arbitrary JavaScript objects",
14
+ "scripts": {
15
+ "tsc": "tsc",
16
+ "eslint": "eslint --ext=js,cjs,md,html .",
17
+ "lint": "npm run eslint --",
18
+ "coverage": "open-cli http://localhost:8087/coverage/lcov-report/",
19
+ "open": "open-cli http://localhost:8087/demo/",
20
+ "start": "node server 8087",
21
+ "start-instrumented": "node server 8087 instrumented",
22
+ "cypress:open": "cypress open",
23
+ "rollup": "rollup -c",
24
+ "instrument-add": "nyc instrument src instrumented",
25
+ "instrument-remove-cache": "rimraf node_modules/.cache",
26
+ "instrument-remove-instrumented": "rimraf instrumented",
27
+ "instrument-remove": "run-p -c instrument-remove-cache instrument-remove-instrumented",
28
+ "copy-pages": "cp node_modules/sceditor/minified/themes/default.min.css vendor/sceditor/minified/themes/default.min.css && cp node_modules/sceditor/minified/sceditor.min.js vendor/sceditor/minified/sceditor.min.js && cp node_modules/sceditor/minified/formats/bbcode.js vendor/sceditor/minified/formats/bbcode.js && cp node_modules/sceditor/minified/formats/xhtml.js vendor/sceditor/minified/formats/xhtml.js",
29
+ "copy-index": "cp src/index-instrumented.html instrumented/index.html",
30
+ "copy-jamilih": "cp node_modules/jamilih/dist/jml-es.js vendor/jamilih/dist/jml-es.js",
31
+ "copy-typeson-registry": "cp node_modules/typeson-registry/dist/index.js vendor/typeson-registry/dist/index.js",
32
+ "copy": "run-p copy-jamilih copy-typeson-registry",
33
+ "instrument": "run-s -c instrument-remove instrument-add copy-index",
34
+ "cypress:log": "ELECTRON_ENABLE_LOGGING=1 cypress run; nyc report",
35
+ "cypress": "cypress run; nyc report",
36
+ "test": "npm run eslint && npm run rollup && npm run cypress"
37
+ },
10
38
  "browserslist": [
11
39
  "cover 100%"
12
40
  ],
@@ -80,29 +108,5 @@
80
108
  },
81
109
  "bugs": "https://github.com/es-joy/jsoe/issues",
82
110
  "license": "MIT",
83
- "homepage": "https://github.com/es-joy/jsoe#readme",
84
- "scripts": {
85
- "tsc": "tsc",
86
- "eslint": "eslint --ext=js,cjs,md,html .",
87
- "lint": "npm run eslint --",
88
- "coverage": "open-cli http://localhost:8087/coverage/lcov-report/",
89
- "open": "open-cli http://localhost:8087/demo/",
90
- "start": "node server 8087",
91
- "start-instrumented": "node server 8087 instrumented",
92
- "cypress:open": "cypress open",
93
- "rollup": "rollup -c",
94
- "instrument-add": "nyc instrument src instrumented",
95
- "instrument-remove-cache": "rimraf node_modules/.cache",
96
- "instrument-remove-instrumented": "rimraf instrumented",
97
- "instrument-remove": "run-p -c instrument-remove-cache instrument-remove-instrumented",
98
- "copy-pages": "cp node_modules/sceditor/minified/themes/default.min.css vendor/sceditor/minified/themes/default.min.css && cp node_modules/sceditor/minified/sceditor.min.js vendor/sceditor/minified/sceditor.min.js && cp node_modules/sceditor/minified/formats/bbcode.js vendor/sceditor/minified/formats/bbcode.js && cp node_modules/sceditor/minified/formats/xhtml.js vendor/sceditor/minified/formats/xhtml.js",
99
- "copy-index": "cp src/index-instrumented.html instrumented/index.html",
100
- "copy-jamilih": "cp node_modules/jamilih/dist/jml-es.js vendor/jamilih/dist/jml-es.js",
101
- "copy-typeson-registry": "cp node_modules/typeson-registry/dist/index.js vendor/typeson-registry/dist/index.js",
102
- "copy": "run-p copy-jamilih copy-typeson-registry",
103
- "instrument": "run-s -c instrument-remove instrument-add copy-index",
104
- "cypress:log": "ELECTRON_ENABLE_LOGGING=1 cypress run; nyc report",
105
- "cypress": "cypress run; nyc report",
106
- "test": "npm run eslint && npm run rollup && npm run cypress"
107
- }
108
- }
111
+ "homepage": "https://github.com/es-joy/jsoe#readme"
112
+ }
@@ -1,58 +0,0 @@
1
- /* eslint-disable import/unambiguous -- Testing */
2
-
3
- /**
4
- * @typedef {any} ArbitraryValue
5
- */
6
-
7
- /**
8
- * @param {ArbitraryValue} t
9
- * @yields {ArbitraryValue}
10
- * @returns {void}
11
- */
12
- function * postorder (t) {
13
- if (Array.isArray(t)) {
14
- for (const child of t) {
15
- yield * postorder(child);
16
- }
17
- } else {
18
- for (const child of Object.values(t)) {
19
- yield * postorder(child);
20
- }
21
- }
22
- if (t !== null && typeof t === 'object' && !Array.isArray(t)) {
23
- yield t;
24
- }
25
- }
26
-
27
- const mytree = {
28
- value: 1,
29
- children: [
30
- {
31
- value: 2,
32
- children: [{
33
- value: 4,
34
- children: []
35
- }]
36
- },
37
- {
38
- value: 3,
39
- children: [
40
- {
41
- value: 5,
42
- children: []
43
- },
44
- {
45
- value: 6,
46
- children: [
47
- {
48
- value: 7,
49
- children: []
50
- }
51
- ]
52
- }
53
- ]
54
- }
55
- ]
56
- };
57
-
58
- console.log([...postorder(mytree)]);