@thi.ng/rstream-log-file 1.0.5 → 2.0.3

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/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [1.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-log-file@1.0.4...@thi.ng/rstream-log-file@1.0.5) (2021-08-22)
6
+ ## [2.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-log-file@2.0.2...@thi.ng/rstream-log-file@2.0.3) (2021-10-15)
7
7
 
8
8
  **Note:** Version bump only for package @thi.ng/rstream-log-file
9
9
 
@@ -11,8 +11,57 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- # 0.1.0 (2019-03-19)
14
+ ## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-log-file@2.0.1...@thi.ng/rstream-log-file@2.0.2) (2021-10-15)
15
15
 
16
- ### Features
16
+ **Note:** Version bump only for package @thi.ng/rstream-log-file
17
+
18
+
19
+
20
+
21
+
22
+ ## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-log-file@2.0.0...@thi.ng/rstream-log-file@2.0.1) (2021-10-13)
23
+
24
+ **Note:** Version bump only for package @thi.ng/rstream-log-file
25
+
26
+
27
+
28
+
29
+
30
+ # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-log-file@1.0.6...@thi.ng/rstream-log-file@2.0.0) (2021-10-12)
31
+
32
+
33
+ ### Build System
34
+
35
+ * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
36
+
37
+
38
+ ### BREAKING CHANGES
39
+
40
+ * discontinue CommonJS & UMD versions
41
+
42
+ - only ESM modules will be published from now on
43
+ - CJS obsolete due to ESM support in recent versions of node:
44
+ - i.e. launch NodeJS via:
45
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
46
+ - in the node REPL use `await import(...)` instead of `require()`
47
+ - UMD obsolete due to widespread browser support for ESM
48
+
49
+ Also:
50
+ - normalize/restructure/reorg all package.json files
51
+ - cleanup all build scripts, remove obsolete
52
+ - switch from mocha to @thi.ng/testament for all tests
53
+
54
+
55
+
56
+
57
+
58
+
59
+ ## [1.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-log-file@1.0.4...@thi.ng/rstream-log-file@1.0.5) (2021-08-22)
60
+
61
+ **Note:** Version bump only for package @thi.ng/rstream-log-file
62
+
63
+ # 0.1.0 (2019-03-19)
64
+
65
+ ### Features
17
66
 
18
- * **rstream-log-file:** extract as new pkg from rstream-log ([7b76b37](https://github.com/thi-ng/umbrella/commit/7b76b37))
67
+ - **rstream-log-file:** extract as new pkg from rstream-log ([7b76b37](https://github.com/thi-ng/umbrella/commit/7b76b37))
package/README.md CHANGED
@@ -33,15 +33,24 @@ File output handler for structured, multilevel & hierarchical loggers based on [
33
33
  yarn add @thi.ng/rstream-log-file
34
34
  ```
35
35
 
36
+ ES module import:
37
+
36
38
  ```html
37
- // ES module
38
- <script type="module" src="https://unpkg.com/@thi.ng/rstream-log-file?module" crossorigin></script>
39
+ <script type="module" src="https://cdn.skypack.dev/@thi.ng/rstream-log-file"></script>
40
+ ```
41
+
42
+ [Skypack documentation](https://docs.skypack.dev/)
43
+
44
+ For Node.js REPL:
45
+
46
+ ```text
47
+ # with flag only for < v16
48
+ node --experimental-repl-await
39
49
 
40
- // UMD
41
- <script src="https://unpkg.com/@thi.ng/rstream-log-file/lib/index.umd.js" crossorigin></script>
50
+ > const rstreamLogFile = await import("@thi.ng/rstream-log-file");
42
51
  ```
43
52
 
44
- Package sizes (gzipped, pre-treeshake): ESM: 130 bytes / CJS: 183 bytes / UMD: 301 bytes
53
+ Package sizes (gzipped, pre-treeshake): ESM: 130 bytes
45
54
 
46
55
  ## Dependencies
47
56
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thi.ng/rstream-log-file",
3
- "version": "1.0.5",
3
+ "version": "2.0.3",
4
4
  "description": "File output handler for structured, multilevel & hierarchical loggers based on @thi.ng/rstream",
5
+ "type": "module",
5
6
  "module": "./index.js",
6
- "main": "./lib/index.js",
7
- "umd:main": "./lib/index.umd.js",
8
7
  "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
@@ -24,27 +24,21 @@
24
24
  "author": "Karsten Schmidt <k+npm@thi.ng>",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
- "build": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module",
28
- "build:release": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module all",
29
- "build:es6": "tsc --declaration",
30
- "build:test": "rimraf build && tsc -p test/tsconfig.json",
31
- "build:check": "tsc --isolatedModules --noEmit",
32
- "test": "mocha test",
33
- "cover": "nyc mocha test && nyc report --reporter=lcov",
34
- "clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib",
35
- "doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts",
36
- "doc": "typedoc --excludePrivate --out doc --theme ../../tools/doc/typedoc-theme src/index.ts",
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf *.js *.d.ts *.map doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
37
30
  "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
38
- "pub": "yarn build:release && yarn publish --access public"
31
+ "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
+ "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
+ "pub": "yarn build && yarn publish --access public",
34
+ "test": "testament test"
39
35
  },
40
36
  "dependencies": {
41
- "@thi.ng/rstream": "^6.0.20"
37
+ "@thi.ng/rstream": "^7.0.3"
38
+ },
39
+ "devDependencies": {
40
+ "@thi.ng/testament": "^0.1.3"
42
41
  },
43
- "files": [
44
- "*.js",
45
- "*.d.ts",
46
- "lib"
47
- ],
48
42
  "keywords": [
49
43
  "file",
50
44
  "logger",
@@ -56,10 +50,21 @@
56
50
  "publishConfig": {
57
51
  "access": "public"
58
52
  },
59
- "sideEffects": false,
53
+ "engines": {
54
+ "node": ">=12.7"
55
+ },
56
+ "files": [
57
+ "*.js",
58
+ "*.d.ts"
59
+ ],
60
+ "exports": {
61
+ ".": {
62
+ "import": "./index.js"
63
+ }
64
+ },
60
65
  "thi.ng": {
61
66
  "parent": "@thi.ng/rstream-log",
62
67
  "year": 2017
63
68
  },
64
- "gitHead": "8ead409ded4bf8dceb0f24a538ba5ca00d07108d"
69
+ "gitHead": "1fb38cac74d6c009d96855c28784a267a81badf1"
65
70
  }
package/lib/index.js DELETED
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var fs = require('fs');
6
-
7
- const writeFile = (path) => ({
8
- next(msg) {
9
- fs.appendFile(path, msg + "\n", (e) => {
10
- if (e) {
11
- process.stderr.write(e.message);
12
- }
13
- });
14
- },
15
- });
16
-
17
- exports.writeFile = writeFile;
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../index.js"],"sourcesContent":null,"names":["appendFile"],"mappings":";;;;;;AACY,MAAC,SAAS,GAAG,CAAC,IAAI,MAAM;AACpC,IAAI,IAAI,CAAC,GAAG,EAAE;AACd,QAAQA,aAAU,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,EAAE,CAAC,CAAC,KAAK;AAC5C,YAAY,IAAI,CAAC,EAAE;AACnB,gBAAgB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAChD,aAAa;AACb,SAAS,CAAC,CAAC;AACX,KAAK;AACL,CAAC;;;;"}
package/lib/index.umd.js DELETED
@@ -1 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("fs")):"function"==typeof define&&define.amd?define(["exports","fs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.rstreamLogFile={}),e.fs)}(this,(function(e,t){"use strict";e.writeFile=e=>({next(i){t.appendFile(e,i+"\n",(e=>{e&&process.stderr.write(e.message)}))}}),Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.js","sources":["../index.js"],"sourcesContent":null,"names":["appendFile"],"mappings":";;;;;;AACY,UAAC,SAAS,GAAG,CAAC,IAAI,MAAM;IACpC,IAAI,IAAI,CAAC,GAAG,EAAE;IACd,QAAQA,aAAU,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,EAAE,CAAC,CAAC,KAAK;IAC5C,YAAY,IAAI,CAAC,EAAE;IACnB,gBAAgB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAChD,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK;IACL,CAAC;;;;;;;;;;"}