@ws-ui/formatter 0.1.19 → 0.1.21

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/package.json CHANGED
@@ -1,50 +1,50 @@
1
- {
2
- "name": "@ws-ui/formatter",
3
- "version": "0.1.19",
4
- "description": "A module for formatting text, dates and numbers",
5
- "main": "dist/index.js",
6
- "type": "module",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "files": [
10
- "dist",
11
- "out"
12
- ],
13
- "scripts": {
14
- "test:watch": "jest --watch",
15
- "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
16
- "build": "tsc && swc ./src -d dist -s true && npm run bundle",
17
- "postbuild": "yalc push --changed",
18
- "bundle": "node ./scripts/bundle.js",
19
- "test": "jest",
20
- "lint": "eslint .",
21
- "format": "prettier --write src/**/*.ts && npm run lint -- --fix",
22
- "prepack": "npm run build"
23
- },
24
- "repository": {
25
- "type": "git",
26
- "url": "git@git-ps.wakanda.io:4d/web-studio/formatter.git"
27
- },
28
- "author": "",
29
- "license": "MIT",
30
- "devDependencies": {
31
- "@swc/cli": "0.1.62",
32
- "@swc/core": "^1.3.77",
33
- "@swc/jest": "^0.2.29",
34
- "@typescript-eslint/eslint-plugin": "^6.4.0",
35
- "@typescript-eslint/parser": "^6.4.0",
36
- "esbuild": "^0.19.2",
37
- "eslint": "^8.47.0",
38
- "jest": "^29.6.2",
39
- "prettier": "^3.0.2",
40
- "typescript": "^5.1.6",
41
- "yalc": "^1.0.0-pre.53"
42
- },
43
- "dependencies": {
44
- "@ws-ui/intl": "^1.2.6",
45
- "numfmt": "^2.5.1"
46
- },
47
- "peerDependencies": {
48
- "date-fns": "^2"
49
- }
50
- }
1
+ {
2
+ "name": "@ws-ui/formatter",
3
+ "version": "0.1.21",
4
+ "description": "A module for formatting text, dates and numbers",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "out"
12
+ ],
13
+ "scripts": {
14
+ "test:watch": "jest --watch",
15
+ "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
16
+ "build": "tsc && swc ./src -d dist -s true && npm run bundle",
17
+ "postbuild": "yalc push --changed",
18
+ "bundle": "node ./scripts/bundle.js",
19
+ "test": "jest",
20
+ "lint": "eslint .",
21
+ "format": "prettier --write src/**/*.ts && npm run lint -- --fix",
22
+ "prepack": "npm run build"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git@git-ps.wakanda.io:4d/web-studio/formatter.git"
27
+ },
28
+ "author": "",
29
+ "license": "MIT",
30
+ "devDependencies": {
31
+ "@swc/cli": "0.1.62",
32
+ "@swc/core": "^1.3.77",
33
+ "@swc/jest": "^0.2.29",
34
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
35
+ "@typescript-eslint/parser": "^6.4.0",
36
+ "esbuild": "^0.19.2",
37
+ "eslint": "^8.47.0",
38
+ "jest": "^29.6.2",
39
+ "prettier": "^3.0.2",
40
+ "typescript": "^5.1.6",
41
+ "yalc": "^1.0.0-pre.53"
42
+ },
43
+ "dependencies": {
44
+ "@ws-ui/intl": "^1.2.6",
45
+ "numfmt": "^2.5.1"
46
+ },
47
+ "peerDependencies": {
48
+ "date-fns": "^2"
49
+ }
50
+ }
package/dist/waiter.js DELETED
@@ -1,27 +0,0 @@
1
- export class Mutex {
2
- current = Promise.resolve();
3
- lock() {
4
- let _resolve;
5
- const p = new Promise((resolve)=>{
6
- _resolve = ()=>resolve();
7
- });
8
- // Caller gets a promise that resolves when the current outstanding
9
- // lock resolves
10
- const rv = this.current.then(()=>_resolve);
11
- // Don't allow the next request until the new promise is done
12
- this.current = p;
13
- // Return the new promise
14
- return rv;
15
- }
16
- }
17
- export function queue() {
18
- const mutex = new Mutex();
19
- return async (fn)=>{
20
- const unlock = await mutex.lock();
21
- const value = await fn();
22
- unlock();
23
- return value;
24
- };
25
- }
26
-
27
- //# sourceMappingURL=waiter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/waiter.ts"],"sourcesContent":["export class Mutex {\n current: Promise<unknown> = Promise.resolve();\n lock() {\n let _resolve;\n const p = new Promise<void>((resolve) => {\n _resolve = () => resolve();\n });\n // Caller gets a promise that resolves when the current outstanding\n // lock resolves\n const rv = this.current.then(() => _resolve);\n // Don't allow the next request until the new promise is done\n this.current = p;\n // Return the new promise\n return rv;\n }\n}\n\nexport function queue() {\n const mutex = new Mutex();\n return async <T>(fn: () => T): Promise<T> => {\n const unlock = await mutex.lock();\n const value = await fn();\n unlock();\n return value;\n };\n}\n"],"names":["Mutex","current","Promise","resolve","lock","_resolve","p","rv","then","queue","mutex","fn","unlock","value"],"mappings":"AAAA,OAAO,MAAMA;IACXC,UAA4BC,QAAQC,OAAO,GAAG;IAC9CC,OAAO;QACL,IAAIC;QACJ,MAAMC,IAAI,IAAIJ,QAAc,CAACC;YAC3BE,WAAW,IAAMF;QACnB;QACA,mEAAmE;QACnE,gBAAgB;QAChB,MAAMI,KAAK,IAAI,CAACN,OAAO,CAACO,IAAI,CAAC,IAAMH;QACnC,6DAA6D;QAC7D,IAAI,CAACJ,OAAO,GAAGK;QACf,yBAAyB;QACzB,OAAOC;IACT;AACF;AAEA,OAAO,SAASE;IACd,MAAMC,QAAQ,IAAIV;IAClB,OAAO,OAAUW;QACf,MAAMC,SAAS,MAAMF,MAAMN,IAAI;QAC/B,MAAMS,QAAQ,MAAMF;QACpBC;QACA,OAAOC;IACT;AACF"}