@yarn-tool/setup-module-env 2.0.1 → 2.0.4

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,6 +3,42 @@
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
+ ## [2.0.4](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/setup-module-env@2.0.3...@yarn-tool/setup-module-env@2.0.4) (2022-08-26)
7
+
8
+
9
+
10
+ ### 🔖 Miscellaneous
11
+
12
+ * . ([157d5dc](https://github.com/bluelovers/ws-yarn-workspaces/commit/157d5dc8959261d9326f6e633987182898ae9670))
13
+
14
+
15
+
16
+ ## [2.0.3](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/setup-module-env@2.0.2...@yarn-tool/setup-module-env@2.0.3) (2022-08-25)
17
+
18
+
19
+
20
+ ### 📦 Code Refactoring
21
+
22
+ * update script ([cd1016d](https://github.com/bluelovers/ws-yarn-workspaces/commit/cd1016ddcd93d1c1df4795ea4228ec45a76822c3))
23
+
24
+
25
+
26
+ ## [2.0.2](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/setup-module-env@2.0.1...@yarn-tool/setup-module-env@2.0.2) (2022-08-13)
27
+
28
+
29
+ ### ✨ Features
30
+
31
+ * update preset scripts ([a286355](https://github.com/bluelovers/ws-yarn-workspaces/commit/a286355a578654937a660f7ad04d190a21f29e92))
32
+
33
+
34
+ ### 🚨 Tests
35
+
36
+ * update jest.config.js and deps ([d1d501b](https://github.com/bluelovers/ws-yarn-workspaces/commit/d1d501ba059130bd8f90e6eaa266084110698011))
37
+
38
+
39
+
40
+
41
+
6
42
  ## [2.0.1](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/setup-module-env@2.0.0...@yarn-tool/setup-module-env@2.0.1) (2022-07-31)
7
43
 
8
44
 
@@ -1,31 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setup = exports.defaultCopyStaticFilesTsdx = exports.updatePackageJson = void 0;
4
+ const scripts_1 = require("@yarn-tool/pkg-entry-util/lib/field/scripts");
4
5
  function updatePackageJson(pkg) {
5
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
6
- var _p, _q, _r, _s, _t, _u, _v, _w;
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
7
+ var _q, _r, _s, _t, _u, _v, _w, _x, _y;
7
8
  (_a = pkg.scripts) !== null && _a !== void 0 ? _a : (pkg.scripts = {});
8
- (_b = (_p = pkg.scripts)["posttest"]) !== null && _b !== void 0 ? _b : (_p["posttest"] = "yarn run build");
9
- if (!((_c = pkg.scripts["build"]) === null || _c === void 0 ? void 0 : _c.includes('run build:tsdx'))) {
9
+ if ((0, scripts_1.scriptsEntryIsNoTestSpecified)(pkg.scripts["test"])) {
10
+ pkg.scripts["test"] = void 0;
11
+ }
12
+ (_b = (_q = pkg.scripts)["test"]) !== null && _b !== void 0 ? _b : (_q["test"] = "jest --passWithNoTests" /* EnumScriptsEntry.JEST_TEST */);
13
+ (_c = (_r = pkg.scripts)["posttest"]) !== null && _c !== void 0 ? _c : (_r["posttest"] = "yarn run build");
14
+ if (!((_d = pkg.scripts["build"]) === null || _d === void 0 ? void 0 : _d.includes('run build:tsdx'))) {
10
15
  pkg.scripts["build"] = "yarn run build:tsdx && yarn run build:dts:bundle";
11
16
  }
12
- (_d = (_q = pkg.scripts)["build:dts:bundle"]) !== null && _d !== void 0 ? _d : (_q["build:dts:bundle"] = "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle");
13
- (_e = (_r = pkg.scripts)["build:tsdx"]) !== null && _e !== void 0 ? _e : (_r["build:tsdx"] = "ynpx @bluelovers/tsdx build --target node");
14
- (_f = (_s = pkg.scripts)["build:dts:copy"]) !== null && _f !== void 0 ? _f : (_s["build:dts:copy"] = "copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts");
15
- (_g = (_t = pkg.scripts)["build:dts:tsc:emit"]) !== null && _g !== void 0 ? _g : (_t["build:dts:tsc:emit"] = "tsc --emitDeclarationOnly --declaration --noEmit false");
16
- (_h = (_u = pkg.scripts)["build:dts:tsc"]) !== null && _h !== void 0 ? _h : (_u["build:dts:tsc"] = "yarn run build:dts:tsc:emit && yarn run build:dts:copy");
17
+ (_e = (_s = pkg.scripts)["build:dts:bundle"]) !== null && _e !== void 0 ? _e : (_s["build:dts:bundle"] = "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle" /* EnumScriptsEntry.BUILD_DTS_BUNDLE */);
18
+ (_f = (_t = pkg.scripts)["build:tsdx"]) !== null && _f !== void 0 ? _f : (_t["build:tsdx"] = "ynpx @bluelovers/tsdx build --target node");
19
+ (_g = (_u = pkg.scripts)["build:dts:copy"]) !== null && _g !== void 0 ? _g : (_u["build:dts:copy"] = "copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts");
20
+ (_h = (_v = pkg.scripts)["build:dts:tsc:emit"]) !== null && _h !== void 0 ? _h : (_v["build:dts:tsc:emit"] = "tsc --emitDeclarationOnly --declaration --noEmit false");
21
+ (_j = (_w = pkg.scripts)["build:dts:tsc"]) !== null && _j !== void 0 ? _j : (_w["build:dts:tsc"] = "yarn run build:dts:tsc:emit && yarn run build:dts:copy");
17
22
  pkg.main = "dist/index.cjs";
18
23
  pkg.module = "dist/index.esm.mjs";
19
24
  pkg.types = pkg.typings = "dist/index.d.ts";
20
- (_j = pkg.unpkg) !== null && _j !== void 0 ? _j : (pkg.unpkg = "dist/index.umd.production.min.cjs");
21
- (_k = pkg.exports) !== null && _k !== void 0 ? _k : (pkg.exports = {});
22
- (_l = (_v = pkg.exports)['.']) !== null && _l !== void 0 ? _l : (_v['.'] = {});
25
+ (_k = pkg.unpkg) !== null && _k !== void 0 ? _k : (pkg.unpkg = "dist/index.umd.production.min.cjs");
26
+ (_l = pkg.exports) !== null && _l !== void 0 ? _l : (pkg.exports = {});
27
+ (_m = (_x = pkg.exports)['.']) !== null && _m !== void 0 ? _m : (_x['.'] = {});
23
28
  pkg.exports['.'].types = "./dist/index.d.ts";
24
29
  pkg.exports['.'].import = "./dist/index.esm.mjs";
25
30
  pkg.exports['.'].require = "./dist/index.cjs";
26
31
  pkg.exports['./src/*'] = './src/*';
27
- (_m = (_w = pkg.exports)['./package.json']) !== null && _m !== void 0 ? _m : (_w['./package.json'] = './package.json');
28
- (_o = pkg.keywords) !== null && _o !== void 0 ? _o : (pkg.keywords = []);
32
+ (_o = (_y = pkg.exports)['./package.json']) !== null && _o !== void 0 ? _o : (_y['./package.json'] = './package.json');
33
+ (_p = pkg.keywords) !== null && _p !== void 0 ? _p : (pkg.keywords = []);
29
34
  pkg.keywords.push('create-by-tsdx');
30
35
  return pkg;
31
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAIA,SAAgB,iBAAiB,CAAyB,GAAM;;;IAE/D,MAAA,GAAG,CAAC,OAAO,oCAAX,GAAG,CAAC,OAAO,GAAK,EAAE,EAAC;IAEnB,YAAA,GAAG,CAAC,OAAO,EAAC,UAAU,wCAAV,UAAU,IAAM,gBAAgB,EAAC;IAE7C,IAAI,CAAC,CAAA,MAAA,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,0CAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAA,EACrD;QACC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,kDAAkD,CAAC;KAC1E;IAED,YAAA,GAAG,CAAC,OAAO,EAAC,kBAAkB,wCAAlB,kBAAkB,IAAM,2HAA2H,EAAC;IAChK,YAAA,GAAG,CAAC,OAAO,EAAC,YAAY,wCAAZ,YAAY,IAAM,2CAA2C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AAe,EAAE,6BAA6B,EAAE,eAAe,CAAC;IACjE,CAAC,oBAAoB,EAAE,6BAA6B,EAAE,oBAAoB,CAAC;CAElE,CAAC;AAEE,QAAA,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,2BAA2B,CAA0E,CAAC;AAa9J,SAAgB,KAAK,CAAyB,MAA4B;IAEzE,IAAI,EACH,GAAG,EACH,QAAQ,GACR,GAAG,MAAM,CAAC;IAEX,GAAG,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAE7B,QAAQ,GAAG;QACV,GAAG,kCAA0B;QAC7B,GAAG,QAAQ;KACX,CAAC;IAEF,OAAO;QACN,GAAG,MAAM;QACT,GAAG;QACH,QAAQ;KACR,CAAA;AACF,CAAC;AAnBD,sBAmBC","sourcesContent":["import { IPackageJson } from '@ts-type/package-dts/package-json';\nimport { IFindRootReturnType } from '@yarn-tool/find-root';\nimport { _Key, IStaticFilesMapArray } from '@yarn-tool/static-file/lib/types';\n\nexport function updatePackageJson<P extends IPackageJson>(pkg: P)\n{\n\tpkg.scripts ??= {};\n\n\tpkg.scripts[\"posttest\"] ??= \"yarn run build\";\n\n\tif (!pkg.scripts[\"build\"]?.includes('run build:tsdx'))\n\t{\n\t\tpkg.scripts[\"build\"] = \"yarn run build:tsdx && yarn run build:dts:bundle\";\n\t}\n\n\tpkg.scripts[\"build:dts:bundle\"] ??= \"ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle\";\n\tpkg.scripts[\"build:tsdx\"] ??= \"ynpx @bluelovers/tsdx build --target node\";\n\n\tpkg.scripts[\"build:dts:copy\"] ??= \"copy .\\\\src\\\\index.d.ts .\\\\dist\\\\index.d.ts & echo build:dts\";\n\tpkg.scripts[\"build:dts:tsc:emit\"] ??= \"tsc --emitDeclarationOnly --declaration --noEmit false\";\n\tpkg.scripts[\"build:dts:tsc\"] ??= \"yarn run build:dts:tsc:emit && yarn run build:dts:copy\";\n\n\tpkg.main = \"dist/index.cjs\";\n\tpkg.module = \"dist/index.esm.mjs\";\n\tpkg.types = pkg.typings = \"dist/index.d.ts\";\n\tpkg.unpkg ??= \"dist/index.umd.production.min.cjs\";\n\n\tpkg.exports ??= {};\n\tpkg.exports['.'] ??= {};\n\tpkg.exports['.'].types = \"./dist/index.d.ts\";\n\tpkg.exports['.'].import = \"./dist/index.esm.mjs\";\n\tpkg.exports['.'].require = \"./dist/index.cjs\";\n\n\tpkg.exports['./src/*'] = './src/*';\n\tpkg.exports['./package.json'] ??= './package.json';\n\n\tpkg.keywords ??= [];\n\tpkg.keywords.push('create-by-tsdx');\n\n\treturn pkg\n}\n\nconst _defaultCopyStaticFilesTsdx = [\n\n\t['tsconfig.json', 'file/tsconfig.tsdx.json.tpl', 'tsconfig.json'],\n\t['test/tsconfig.json', 'file/test/tsconfig.json.tpl', 'test/tsconfig.json'],\n\n] as const;\n\nexport const defaultCopyStaticFilesTsdx = Object.freeze(_defaultCopyStaticFilesTsdx) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFilesTsdx>>;\n\nexport interface ISetupTsdxOptions<P extends IPackageJson>\n{\n\ttargetDir: string,\n\tpkg: P,\n\trootData: IFindRootReturnType,\n\tfile_map: IStaticFilesMapArray<string>,\n\tmdFile: string,\n\texistsReadme: boolean,\n\toldExists: boolean,\n}\n\nexport function setup<P extends IPackageJson>(config: ISetupTsdxOptions<P>)\n{\n\tlet {\n\t\tpkg,\n\t\tfile_map,\n\t} = config;\n\n\tpkg = updatePackageJson(pkg);\n\n\tfile_map = [\n\t\t...defaultCopyStaticFilesTsdx,\n\t\t...file_map,\n\t];\n\n\treturn {\n\t\t...config,\n\t\tpkg,\n\t\tfile_map,\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAGA,yEAA8G;AAE9G,SAAgB,iBAAiB,CAAyB,GAAM;;;IAE/D,MAAA,GAAG,CAAC,OAAO,oCAAX,GAA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AO,EAAC,GAAG,wCAAH,GAAG,IAAM,EAAE,EAAC;IACxB,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,mBAAmB,CAAC;IAC7C,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,sBAAsB,CAAC;IACjD,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,GAAG,kBAAkB,CAAC;IAE9C,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IACnC,YAAA,GAAG,CAAC,OAAO,EAAC,gBAAgB,wCAAhB,gBAAgB,IAAM,gBAAgB,EAAC;IAEnD,MAAA,GAAG,CAAC,QAAQ,oCAAZ,GAAG,CAAC,QAAQ,GAAK,EAAE,EAAC;IACpB,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAEpC,OAAO,GAAG,CAAA;AACX,CAAC;AA3CD,8CA2CC;AAED,MAAM,2BAA2B,GAAG;IAEnC,CAAC,eAAe,EAAE,6BAA6B,EAAE,eAAe,CAAC;IACjE,CAAC,oBAAoB,EAAE,6BAA6B,EAAE,oBAAoB,CAAC;CAElE,CAAC;AAEE,QAAA,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,2BAA2B,CAA0E,CAAC;AAa9J,SAAgB,KAAK,CAAyB,MAA4B;IAEzE,IAAI,EACH,GAAG,EACH,QAAQ,GACR,GAAG,MAAM,CAAC;IAEX,GAAG,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAE7B,QAAQ,GAAG;QACV,GAAG,kCAA0B;QAC7B,GAAG,QAAQ;KACX,CAAC;IAEF,OAAO;QACN,GAAG,MAAM;QACT,GAAG;QACH,QAAQ;KACR,CAAA;AACF,CAAC;AAnBD,sBAmBC","sourcesContent":["import { IPackageJson } from '@ts-type/package-dts/package-json';\nimport { IFindRootReturnType } from '@yarn-tool/find-root';\nimport { _Key, IStaticFilesMapArray } from '@yarn-tool/static-file/lib/types';\nimport { EnumScriptsEntry, scriptsEntryIsNoTestSpecified } from '@yarn-tool/pkg-entry-util/lib/field/scripts';\n\nexport function updatePackageJson<P extends IPackageJson>(pkg: P)\n{\n\tpkg.scripts ??= {};\n\n\tif (scriptsEntryIsNoTestSpecified(pkg.scripts[\"test\"]))\n\t{\n\t\tpkg.scripts[\"test\"] = void 0;\n\t}\n\n\tpkg.scripts[\"test\"] ??= EnumScriptsEntry.JEST_TEST;\n\n\tpkg.scripts[\"posttest\"] ??= \"yarn run build\";\n\n\tif (!pkg.scripts[\"build\"]?.includes('run build:tsdx'))\n\t{\n\t\tpkg.scripts[\"build\"] = \"yarn run build:tsdx && yarn run build:dts:bundle\";\n\t}\n\n\tpkg.scripts[\"build:dts:bundle\"] ??= EnumScriptsEntry.BUILD_DTS_BUNDLE;\n\tpkg.scripts[\"build:tsdx\"] ??= \"ynpx @bluelovers/tsdx build --target node\";\n\n\tpkg.scripts[\"build:dts:copy\"] ??= \"copy .\\\\src\\\\index.d.ts .\\\\dist\\\\index.d.ts & echo build:dts\";\n\tpkg.scripts[\"build:dts:tsc:emit\"] ??= \"tsc --emitDeclarationOnly --declaration --noEmit false\";\n\tpkg.scripts[\"build:dts:tsc\"] ??= \"yarn run build:dts:tsc:emit && yarn run build:dts:copy\";\n\n\tpkg.main = \"dist/index.cjs\";\n\tpkg.module = \"dist/index.esm.mjs\";\n\tpkg.types = pkg.typings = \"dist/index.d.ts\";\n\tpkg.unpkg ??= \"dist/index.umd.production.min.cjs\";\n\n\tpkg.exports ??= {};\n\tpkg.exports['.'] ??= {};\n\tpkg.exports['.'].types = \"./dist/index.d.ts\";\n\tpkg.exports['.'].import = \"./dist/index.esm.mjs\";\n\tpkg.exports['.'].require = \"./dist/index.cjs\";\n\n\tpkg.exports['./src/*'] = './src/*';\n\tpkg.exports['./package.json'] ??= './package.json';\n\n\tpkg.keywords ??= [];\n\tpkg.keywords.push('create-by-tsdx');\n\n\treturn pkg\n}\n\nconst _defaultCopyStaticFilesTsdx = [\n\n\t['tsconfig.json', 'file/tsconfig.tsdx.json.tpl', 'tsconfig.json'],\n\t['test/tsconfig.json', 'file/test/tsconfig.json.tpl', 'test/tsconfig.json'],\n\n] as const;\n\nexport const defaultCopyStaticFilesTsdx = Object.freeze(_defaultCopyStaticFilesTsdx) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFilesTsdx>>;\n\nexport interface ISetupTsdxOptions<P extends IPackageJson>\n{\n\ttargetDir: string,\n\tpkg: P,\n\trootData: IFindRootReturnType,\n\tfile_map: IStaticFilesMapArray<string>,\n\tmdFile: string,\n\texistsReadme: boolean,\n\toldExists: boolean,\n}\n\nexport function setup<P extends IPackageJson>(config: ISetupTsdxOptions<P>)\n{\n\tlet {\n\t\tpkg,\n\t\tfile_map,\n\t} = config;\n\n\tpkg = updatePackageJson(pkg);\n\n\tfile_map = [\n\t\t...defaultCopyStaticFilesTsdx,\n\t\t...file_map,\n\t];\n\n\treturn {\n\t\t...config,\n\t\tpkg,\n\t\tfile_map,\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarn-tool/setup-module-env",
3
- "version": "2.0.1",
3
+ "version": "2.0.4",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "yarn",
@@ -32,7 +32,9 @@
32
32
  "lint": "ynpx --quiet eslint -- **/*.ts",
33
33
  "test": "jest --passWithNoTests",
34
34
  "test:jest": "jest --passWithNoTests",
35
+ "test:jest:snapshot": "yarn run test:jest -- -u",
35
36
  "test:mocha": "ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"",
37
+ "test:snapshot": "yarn run test -- -u",
36
38
  "test:tsdx": "ynpx @bluelovers/tsdx test --passWithNoTests",
37
39
  "build:dts": "ynpx @bluelovers/tsdx dts -o ./dist/index.d.ts ./src/index.ts --no-banner & echo build:dts",
38
40
  "build:tsdx": "ynpx @bluelovers/tsdx build --target node --name index",
@@ -50,11 +52,12 @@
50
52
  "tsc:showConfig": "ynpx get-current-tsconfig -p"
51
53
  },
52
54
  "dependencies": {
55
+ "@yarn-tool/pkg-entry-util": "^2.0.14",
53
56
  "tslib": "^2"
54
57
  },
55
58
  "packageManager": "yarn@1.22.19",
56
59
  "publishConfig": {
57
60
  "access": "public"
58
61
  },
59
- "gitHead": "ff2ab47cbd966bfa7f8eca7378e29571c1b53c1c"
62
+ "gitHead": "150365d3846067505842c6503564abe98ebe508d"
60
63
  }