@baadal-sdk/dapi 0.14.0 → 0.15.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/README.md CHANGED
@@ -1,8 +1,2 @@
1
1
  # dapi
2
2
  Dead-simple API wrappers
3
-
4
- # References:
5
- * https://www.typescriptlang.org/docs/handbook/babel-with-typescript.html
6
- * https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm
7
- * https://marcobotto.com/blog/compiling-and-bundling-typescript-libraries-with-webpack/
8
- * https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":"AACA,IAAIA,EAAsB,CCA1BA,EAAwB,SAASC,EAASC,GACzC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EH,EAAwB,SAASS,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,ICC/FV,EAAwB,SAASC,GACX,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,4HCLvD,IAIA,GAAiBC,IAJL,WACVC,QAAQD,IAAI,YCCRE,EAAM,WACV,MAAO,OAIIC,EAAM,EACnB,I","sources":["webpack://@baadal-sdk/dapi/webpack/bootstrap","webpack://@baadal-sdk/dapi/webpack/runtime/define property getters","webpack://@baadal-sdk/dapi/webpack/runtime/hasOwnProperty shorthand","webpack://@baadal-sdk/dapi/webpack/runtime/make namespace object","webpack://@baadal-sdk/dapi/./src/fs/index.ts","webpack://@baadal-sdk/dapi/./src/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const log = () => {\n console.log('fs/log');\n};\n\nexport default { log };\n","import fs from './fs';\n\nconst foo = () => {\n return 'bar';\n};\n\nexport { fs, foo };\nexport const num = 5;\nexport default fs;\n\n// ----------------\n// TODO:\n// npm pack, tarball, gzip [why?]\n// eslint, prettier\n// husky/lint-staged\n// ----------------\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","log","console","foo","num"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","mappings":"AACA,IAAIA,EAAsB,CCA1BA,EAAwB,SAASC,EAASC,GACzC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EH,EAAwB,SAASS,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,ICC/FV,EAAwB,SAASC,GACX,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,4HCLvD,IAIA,GAAiBC,IAJL,WACVC,QAAQD,IAAI,YCCRE,EAAM,WACV,MAAO,OAIIC,EAAM,EACnB,I","sources":["webpack://@baadal-sdk/dapi/webpack/bootstrap","webpack://@baadal-sdk/dapi/webpack/runtime/define property getters","webpack://@baadal-sdk/dapi/webpack/runtime/hasOwnProperty shorthand","webpack://@baadal-sdk/dapi/webpack/runtime/make namespace object","webpack://@baadal-sdk/dapi/./src/fs/index.ts","webpack://@baadal-sdk/dapi/./src/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const log = () => {\n console.log('fs/log');\n};\n\nexport default { log };\n","import fs from './fs';\n\nconst foo = () => {\n return 'bar';\n};\n\nexport { fs, foo };\nexport const num = 5;\nexport default fs;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","log","console","foo","num"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":"AACA,IAAIA,EAAsB,CCA1BA,EAAwB,SAASC,EAASC,GACzC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EH,EAAwB,SAASS,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,K,8GCA/F,IAIA,GAAiBI,IAJL,WACVC,QAAQD,IAAI,YCCRE,EAAM,WACV,MAAO,OAIIC,EAAM,EACnB,I","sources":["webpack://@baadal-sdk/dapi/webpack/bootstrap","webpack://@baadal-sdk/dapi/webpack/runtime/define property getters","webpack://@baadal-sdk/dapi/webpack/runtime/hasOwnProperty shorthand","webpack://@baadal-sdk/dapi/./src/fs/index.ts","webpack://@baadal-sdk/dapi/./src/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const log = () => {\n console.log('fs/log');\n};\n\nexport default { log };\n","import fs from './fs';\n\nconst foo = () => {\n return 'bar';\n};\n\nexport { fs, foo };\nexport const num = 5;\nexport default fs;\n\n// ----------------\n// TODO:\n// npm pack, tarball, gzip [why?]\n// eslint, prettier\n// husky/lint-staged\n// ----------------\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","log","console","foo","num"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","mappings":"AACA,IAAIA,EAAsB,CCA1BA,EAAwB,SAASC,EAASC,GACzC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EH,EAAwB,SAASS,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,K,8GCA/F,IAIA,GAAiBI,IAJL,WACVC,QAAQD,IAAI,YCCRE,EAAM,WACV,MAAO,OAIIC,EAAM,EACnB,I","sources":["webpack://@baadal-sdk/dapi/webpack/bootstrap","webpack://@baadal-sdk/dapi/webpack/runtime/define property getters","webpack://@baadal-sdk/dapi/webpack/runtime/hasOwnProperty shorthand","webpack://@baadal-sdk/dapi/./src/fs/index.ts","webpack://@baadal-sdk/dapi/./src/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const log = () => {\n console.log('fs/log');\n};\n\nexport default { log };\n","import fs from './fs';\n\nconst foo = () => {\n return 'bar';\n};\n\nexport { fs, foo };\nexport const num = 5;\nexport default fs;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","log","console","foo","num"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baadal-sdk/dapi",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Dead-simple API wrappers",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -19,19 +19,45 @@
19
19
  "author": "Abhishek Raj <abhi@raj.me>",
20
20
  "license": "MIT",
21
21
  "scripts": {
22
- "build": "bash tasks/build.sh",
22
+ "build": "npm run verify && bash tasks/build.sh",
23
23
  "clean": "shx rm -rf dist",
24
- "prepublishOnly": "run-s --silent clean build",
25
- "pub": "npm publish",
26
- "pub:test": "npm publish --dry-run"
24
+ "lint": "eslint '**/*.{js,jsx,ts,tsx}'",
25
+ "lint:fix": "npm run lint -- --fix",
26
+ "prepub": "run-s --silent clean build",
27
+ "pub": "npm run prepub && npm publish",
28
+ "pub:test": "npm run prepub && npm publish --dry-run",
29
+ "verify": "jsonlint -q tsconfig.json",
30
+ "blame": "git log -S",
31
+ "hist": "git log --oneline | grep -i",
32
+ "follow": "git log --follow --oneline",
33
+ "ncu": "ncu",
34
+ "ncuu": "ncu -u"
27
35
  },
28
36
  "devDependencies": {
29
37
  "@babel/core": "7.15.5",
30
38
  "@babel/preset-env": "7.15.6",
39
+ "@babel/preset-react": "^7.14.5",
31
40
  "@babel/preset-typescript": "7.15.0",
32
41
  "@types/node": "16.9.6",
42
+ "@types/react": "^16.0.0",
43
+ "@types/react-dom": "^16.0.0",
44
+ "@typescript-eslint/eslint-plugin": "4.31.2",
45
+ "@typescript-eslint/parser": "4.31.2",
33
46
  "babel-loader": "8.2.2",
47
+ "eslint": "7.32.0",
48
+ "eslint-config-airbnb": "18.2.1",
49
+ "eslint-config-airbnb-typescript": "14.0.0",
50
+ "eslint-config-prettier": "8.3.0",
51
+ "eslint-plugin-import": "2.24.2",
52
+ "eslint-plugin-jsx-a11y": "6.4.1",
53
+ "eslint-plugin-prettier": "4.0.0",
54
+ "eslint-plugin-react": "7.26.0",
55
+ "eslint-plugin-react-hooks": "4.2.0",
56
+ "husky": "4.3.8",
57
+ "jsonlint": "1.6.3",
58
+ "lint-staged": "11.1.2",
34
59
  "npm-run-all": "4.1.5",
60
+ "prettier": "2.4.1",
35
61
  "shx": "0.3.3",
36
62
  "typescript": "4.4.3",
37
63
  "webpack": "5.53.0",
@@ -40,9 +66,29 @@
40
66
  "dependencies": {
41
67
  "core-js": "3.18.0"
42
68
  },
69
+ "peerDependencies": {
70
+ "react": "^16.0.0",
71
+ "react-dom": "^16.0.0"
72
+ },
73
+ "peerDependenciesMeta": {
74
+ "react": {
75
+ "optional": true
76
+ },
77
+ "react-dom": {
78
+ "optional": true
79
+ }
80
+ },
43
81
  "browserslist": [
44
82
  "chrome >= 23"
45
83
  ],
84
+ "lint-staged": {
85
+ "*.{js,jsx,ts,tsx}": "eslint --fix"
86
+ },
87
+ "husky": {
88
+ "hooks": {
89
+ "pre-commit": "lint-staged"
90
+ }
91
+ },
46
92
  "repository": {
47
93
  "type": "git",
48
94
  "url": "git+https://github.com/baadal/dapi.git"
package/src/index.ts CHANGED
@@ -7,10 +7,3 @@ const foo = () => {
7
7
  export { fs, foo };
8
8
  export const num = 5;
9
9
  export default fs;
10
-
11
- // ----------------
12
- // TODO:
13
- // npm pack, tarball, gzip [why?]
14
- // eslint, prettier
15
- // husky/lint-staged
16
- // ----------------