emj 0.0.8 β†’ 0.0.10

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.
Files changed (2) hide show
  1. package/README.md +22 -11
  2. package/package.json +12 -10
package/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  _Emoji Object Notation_
4
4
 
5
5
  [![CI](https://github.com/agorischek/emojion/actions/workflows/ci.yml/badge.svg)](https://github.com/agorischek/emojion/actions/workflows/ci.yml)
6
- [![Dependencies](https://img.shields.io/depfu/agorischek/emojion.svg)](https://depfu.com/repos/agorischek/emojion)
7
6
  [![Version](https://img.shields.io/npm/v/emj.svg)](https://www.npmjs.com/package/emj)
8
7
  [![License](https://img.shields.io/github/license/agorischek/emojion.svg)](https://github.com/agorischek/emojion/blob/master/LICENSE)
9
8
 
@@ -26,19 +25,22 @@ _Emoji Object Notation_
26
25
 
27
26
  ## Use
28
27
 
29
- Call `parse()` to turn Emojion into a JavaScript object, and call `generate()`
30
- to go the other way.
28
+ Call `parse()` to turn Emojion into its original JSON text string, and call
29
+ `generate()` to turn JSON text into Emojion.
31
30
 
32
31
  ```ts
33
32
  import { generate, parse } from 'emj';
34
33
 
35
- const object = parse('πŸ™ŒπŸ˜ΆπŸ˜ πŸ€‘πŸ˜³πŸ‘‘πŸ˜πŸπŸ¦‰πŸ¦’πŸ–πŸ¦‰πŸ¦βœ‹');
36
- // { name: "Emojion" }
34
+ const json = parse('πŸ™ŒπŸ˜ΆπŸ˜ πŸ€‘πŸ˜³πŸ‘‘πŸ˜πŸπŸ¦‰πŸ¦’πŸ–πŸ¦‰πŸ¦βœ‹');
35
+ // '{"name":"Emojion"}'
37
36
 
38
- const emojion = generate({ created: 2019 });
37
+ const emojion = generate(JSON.stringify({ created: 2019 }));
39
38
  // πŸ™ŒπŸ˜–πŸ˜­πŸ˜³πŸ˜ πŸ˜›πŸ˜³πŸ€€πŸ•‘πŸ•›πŸ•πŸ•˜βœ‹
40
39
  ```
41
40
 
41
+ Both functions use JSON text so every valid JSON value can round-trip without
42
+ losing type information.
43
+
42
44
  ## Syntax
43
45
 
44
46
  Every Emojion document begins with `πŸ™Œ` β€” because as soon as you start typing
@@ -64,8 +66,8 @@ with `⏰` (because alarms are annoying).
64
66
 
65
67
  In keys, Unicode characters can be encoded using `🌎` followed by fruit, such as
66
68
  `πŸŒŽπŸπŸŠπŸˆπŸ“` for `U+0398` (which is `Θ`). In values, Unicode characters are
67
- encoded using `πŸ—Ί` followed by office supplies, such as `πŸ—ΊπŸ–‹πŸ–ŠπŸ§·πŸ”Ž` for
68
- `U+0394` (which is `Ξ”`).
69
+ encoded using `πŸ—Ί` followed by office supplies, such as `πŸ—ΊπŸ–‹πŸ–ŠπŸ§·πŸ”Ž` for `U+0394`
70
+ (which is `Ξ”`).
69
71
 
70
72
  See [`characters.ts`](./src/characters.ts) for the full character map.
71
73
 
@@ -103,9 +105,18 @@ Emojion is built with the excellent
103
105
 
104
106
  ## Publishing
105
107
 
106
- Releases are published by the
107
- [`Publish Package`](./.github/workflows/publish.yml) GitHub Actions workflow
108
- using npm Trusted Publishing.
108
+ Emojion is a maintained joke package: its premise is intentionally absurd, but
109
+ its runtime dependencies and published security posture are maintained like any
110
+ other library. Garden keeps development tooling and compatible lockfile
111
+ resolutions current while runtime-range changes remain deliberate.
112
+
113
+ Garden dispatches [`Prepare Release`](./.github/workflows/prepare-release.yml)
114
+ with an exact semantic version. The tag is the release source of truth; the
115
+ publisher checks out that immutable tag and stamps the package manifest only in
116
+ its packaging worktree before publishing to npm and creating the matching GitHub
117
+ Release. Routine releases are batched to at most one per week.
118
+
119
+ Publishing uses npm Trusted Publishing.
109
120
 
110
121
  Configure the `emj` package on npm with this trusted publisher:
111
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emj",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Emoji Object Notation",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,15 +21,17 @@
21
21
  "main": "lib/src/index.js",
22
22
  "scripts": {
23
23
  "clean": "rimraf lib && rimraf coverage",
24
- "format": "prettier --write \"{src,test}/**/*.ts\" && prettier --write README.md",
24
+ "format": "prettier --write \"src/**/*.ts\" \"test/**/*.{ts,cjs}\" README.md",
25
+ "format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.{ts,cjs}\" README.md",
25
26
  "lint": "eslint src/**/*.ts",
26
- "prebuild": "npm run clean && npm run format && npm run lint && echo Using TypeScript && tsc --version",
27
+ "prebuild": "npm run clean && npm run format:check && npm run lint && echo Using TypeScript && tsc --version",
27
28
  "build": "npm run build:grammar && npm run build:lib && npm run build:bundle",
28
29
  "build:grammar": "mkdir -p gen && nearleyc src/grammar.ne -o gen/grammar.ts && replace-in-file \"Lexer: lexer,\" \"// @ts-ignore\nLexer: lexer,\" gen/grammar.ts",
29
30
  "build:bundle": "npm run rollup",
30
31
  "build:lib": "tsc --pretty",
31
32
  "start": "npm run build && npm run test",
32
- "test": "npm run build:grammar && vitest run",
33
+ "test": "npm run build:grammar && vitest run --allowOnly=false",
34
+ "test:consumer": "node test/consumer-smoke.cjs .",
33
35
  "coverage": "npm run build:grammar && vitest run --coverage",
34
36
  "update": "ncu -u && npm i && npm test",
35
37
  "rollup": "rollup --config rollup.config.mjs",
@@ -51,22 +53,22 @@
51
53
  "@types/lodash": "^4.17.24",
52
54
  "@types/moo": "^0.5.10",
53
55
  "@types/nearley": "^2.11.5",
54
- "@types/node": "^25.6.2",
56
+ "@types/node": "^26.1.1",
55
57
  "@typescript-eslint/eslint-plugin": "^8.59.2",
56
58
  "@typescript-eslint/parser": "^8.59.2",
57
- "@vitest/coverage-v8": "^4.1.5",
59
+ "@vitest/coverage-v8": "^4.1.8",
58
60
  "eslint": "^10.3.0",
59
61
  "eslint-config-prettier": "^10.1.8",
60
62
  "eslint-plugin-prettier": "^5.5.5",
61
63
  "globals": "^17.6.0",
62
- "npm-check-updates": "^22.1.1",
63
- "prettier": "^3.8.3",
64
- "replace-in-file": "^8.4.0",
64
+ "npm-check-updates": "^23.0.0",
65
+ "prettier": "^3.9.6",
66
+ "replace-in-file": "^9.0.0",
65
67
  "rimraf": "^6.1.3",
66
68
  "rollup": "^4.60.3",
67
69
  "tslib": "^2.8.1",
68
70
  "typescript": "^6.0.3",
69
- "vitest": "^4.1.5"
71
+ "vitest": "^4.1.8"
70
72
  },
71
73
  "engines": {
72
74
  "node": ">=10.0.0"