jiek 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. package/bin/jiek-dev.js +4 -0
  2. package/bin/jiek.js +2 -0
  3. package/dist/commands/build.esm.js +68 -0
  4. package/dist/commands/build.esm.js.map +1 -0
  5. package/dist/commands/build.esm.min.js +2 -0
  6. package/dist/commands/build.esm.min.js.map +1 -0
  7. package/dist/commands/publish.esm.js +60 -0
  8. package/dist/commands/publish.esm.js.map +1 -0
  9. package/dist/commands/publish.esm.min.js +2 -0
  10. package/dist/commands/publish.esm.min.js.map +1 -0
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.esm.d.ts +2 -0
  13. package/dist/index.esm.js +6 -0
  14. package/dist/index.esm.js.map +1 -0
  15. package/dist/index.esm.min.js +2 -0
  16. package/dist/index.esm.min.js.map +1 -0
  17. package/dist/index.iife.js +155 -0
  18. package/dist/index.iife.js.map +1 -0
  19. package/dist/index.iife.min.js +2 -0
  20. package/dist/index.iife.min.js.map +1 -0
  21. package/dist/index.umd.js +158 -0
  22. package/dist/index.umd.js.map +1 -0
  23. package/dist/index.umd.min.js +2 -0
  24. package/dist/index.umd.min.js.map +1 -0
  25. package/dist/inner.esm.js +10 -0
  26. package/dist/inner.esm.js.map +1 -0
  27. package/dist/inner.esm.min.js +2 -0
  28. package/dist/inner.esm.min.js.map +1 -0
  29. package/dist/merge-package-json.esm.js +16 -0
  30. package/dist/merge-package-json.esm.js.map +1 -0
  31. package/dist/merge-package-json.esm.min.js +2 -0
  32. package/dist/merge-package-json.esm.min.js.map +1 -0
  33. package/package.json +56 -0
  34. package/src/commands/build.ts +91 -0
  35. package/src/commands/publish.ts +79 -0
  36. package/src/index.ts +6 -0
  37. package/src/inner.ts +11 -0
  38. package/src/merge-package-json.ts +19 -0
  39. package/src/rollup/index.ts +162 -0
  40. package/src/rollup/plugins/globals.ts +34 -0
  41. package/src/rollup/plugins/skip.ts +23 -0
  42. package/src/rollup/utils/commonOptions.ts +9 -0
  43. package/src/rollup/utils/externalResolver.ts +11 -0
  44. package/src/rollup/utils/globalResolver.ts +24 -0
  45. package/src/rollup/utils/withMinify.ts +16 -0
  46. package/tests/build.spec.ts +28 -0
  47. package/tests/fixtures/node_modules/.bin/jiek +17 -0
  48. package/tests/fixtures/node_modules/.jiek/jiek+test-foo.rollup.config.js +31 -0
  49. package/tests/fixtures/node_modules/.modules.yaml +95 -0
  50. package/tests/fixtures/node_modules/.pnpm/@esbuild+darwin-arm64@0.20.2/node_modules/@esbuild/darwin-arm64/README.md +3 -0
  51. package/tests/fixtures/node_modules/.pnpm/@esbuild+darwin-arm64@0.20.2/node_modules/@esbuild/darwin-arm64/bin/esbuild +0 -0
  52. package/tests/fixtures/node_modules/.pnpm/@esbuild+darwin-arm64@0.20.2/node_modules/@esbuild/darwin-arm64/package.json +20 -0
  53. package/tests/fixtures/node_modules/.pnpm/@jiek+loader-esbuild@1.0.0_esbuild@0.20.2/node_modules/@jiek/loader-esbuild/LICENSE +21 -0
  54. package/tests/fixtures/node_modules/.pnpm/@jiek+loader-esbuild@1.0.0_esbuild@0.20.2/node_modules/@jiek/loader-esbuild/loader.js +3 -0
  55. package/tests/fixtures/node_modules/.pnpm/@jiek+loader-esbuild@1.0.0_esbuild@0.20.2/node_modules/@jiek/loader-esbuild/package.json +8 -0
  56. package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/LICENSE +20 -0
  57. package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/README.md +481 -0
  58. package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/package.json +59 -0
  59. package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js +269 -0
  60. package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js +274 -0
  61. package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js +10 -0
  62. package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js +263 -0
  63. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/LICENSE +21 -0
  64. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/README.md +50 -0
  65. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/loader.d.ts +3 -0
  66. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/loader.js +15 -0
  67. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/node.d.ts +23 -0
  68. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/node.js +4926 -0
  69. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/loader.js +1 -0
  70. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/node_modules/.bin/esbuild +14 -0
  71. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/package.json +46 -0
  72. package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/register.js +3 -0
  73. package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/LICENSE.md +21 -0
  74. package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/README.md +3 -0
  75. package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/bin/esbuild +0 -0
  76. package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/install.js +288 -0
  77. package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/lib/main.d.ts +703 -0
  78. package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/lib/main.js +2436 -0
  79. package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/node_modules/.bin/esbuild +14 -0
  80. package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/package.json +46 -0
  81. package/tests/fixtures/node_modules/.pnpm/lock.yaml +291 -0
  82. package/tests/fixtures/node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js +162 -0
  83. package/tests/fixtures/node_modules/.pnpm/ms@2.1.2/node_modules/ms/license.md +21 -0
  84. package/tests/fixtures/node_modules/.pnpm/ms@2.1.2/node_modules/ms/package.json +37 -0
  85. package/tests/fixtures/node_modules/.pnpm/ms@2.1.2/node_modules/ms/readme.md +60 -0
  86. package/tests/fixtures/node_modules/.pnpm/node_modules/.bin/esbuild +14 -0
  87. package/tests/fixtures/package.json +8 -0
  88. package/tests/fixtures/packages/bar/package.json +4 -0
  89. package/tests/fixtures/packages/foo/dist/index.d.ts +3 -0
  90. package/tests/fixtures/packages/foo/dist/index.esm.d.ts +3 -0
  91. package/tests/fixtures/packages/foo/dist/index.esm.js +6 -0
  92. package/tests/fixtures/packages/foo/dist/index.esm.js.map +1 -0
  93. package/tests/fixtures/packages/foo/dist/index.esm.min.js +2 -0
  94. package/tests/fixtures/packages/foo/dist/index.esm.min.js.map +1 -0
  95. package/tests/fixtures/packages/foo/dist/index.iife.js +15 -0
  96. package/tests/fixtures/packages/foo/dist/index.iife.js.map +1 -0
  97. package/tests/fixtures/packages/foo/dist/index.iife.min.js +2 -0
  98. package/tests/fixtures/packages/foo/dist/index.iife.min.js.map +1 -0
  99. package/tests/fixtures/packages/foo/dist/index.umd.js +16 -0
  100. package/tests/fixtures/packages/foo/dist/index.umd.js.map +1 -0
  101. package/tests/fixtures/packages/foo/dist/index.umd.min.js +2 -0
  102. package/tests/fixtures/packages/foo/dist/index.umd.min.js.map +1 -0
  103. package/tests/fixtures/packages/foo/package.json +7 -0
  104. package/tests/fixtures/packages/foo/src/index.ts +3 -0
  105. package/tests/fixtures/pnpm-workspace.yaml +2 -0
  106. package/tests/publish.spec.ts +31 -0
@@ -0,0 +1,2 @@
1
+ function t(t,e){return t+e}export{t as default};
2
+ //# sourceMappingURL=index.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.min.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":["index","a","b"],"mappings":"AAAA,SAAAA,EAAyBC,EAAWC,GAClC,OAAOD,EAAIC,CACb"}
@@ -0,0 +1,15 @@
1
+ var JiekTestFoo = (function (exports) {
2
+ 'use strict';
3
+
4
+ function index(a, b) {
5
+ return a + b;
6
+ }
7
+
8
+ exports.default = index;
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ return exports;
13
+
14
+ })({});
15
+ //# sourceMappingURL=index.iife.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.iife.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":[],"mappings":";;;EAAA,cAAA,CAAyB,GAAW,CAAW,EAAA;EAC7C,EAAA,OAAO,CAAI,GAAA,CAAA,CAAA;EACb;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ var JiekTestFoo=function(e){"use strict";return e.default=function(e,t){return e+t},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
2
+ //# sourceMappingURL=index.iife.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.iife.min.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":["a","b"],"mappings":"0DAAA,SAAyBA,EAAWC,GAClC,OAAOD,EAAIC,CACb"}
@@ -0,0 +1,16 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JiekTestFoo = {}));
5
+ })(this, (function (exports) { 'use strict';
6
+
7
+ function index(a, b) {
8
+ return a + b;
9
+ }
10
+
11
+ exports.default = index;
12
+
13
+ Object.defineProperty(exports, '__esModule', { value: true });
14
+
15
+ }));
16
+ //# sourceMappingURL=index.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":[],"mappings":";;;;;;EAAA,cAAA,CAAyB,GAAW,CAAW,EAAA;EAC7C,EAAA,OAAO,CAAI,GAAA,CAAA,CAAA;EACb;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).JiekTestFoo={})}(this,(function(e){"use strict";e.default=function(e,t){return e+t},Object.defineProperty(e,"__esModule",{value:!0})}));
2
+ //# sourceMappingURL=index.umd.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.min.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":["a","b"],"mappings":"6PAAA,SAAyBA,EAAWC,GAClC,OAAOD,EAAIC,CACb"}
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@jiek/test-foo",
3
+ "version": "0.1.2",
4
+ "dependencies": {
5
+ "@jiek/test-bar": "workspace:^*"
6
+ }
7
+ }
@@ -0,0 +1,3 @@
1
+ export default function (a: number, b: string) {
2
+ return a + b
3
+ }
@@ -0,0 +1,2 @@
1
+ packages:
2
+ - packages/*
@@ -0,0 +1,31 @@
1
+ import '../src/commands/publish'
2
+
3
+ import fs from 'node:fs'
4
+ import path from 'node:path'
5
+
6
+ import * as childProcess from 'child_process'
7
+ import { program } from 'commander'
8
+ import { afterAll, beforeAll, describe, test } from 'vitest'
9
+
10
+ import { actionFuture } from '../src/inner'
11
+
12
+ const ROOT = path.resolve(__dirname, 'fixtures')
13
+
14
+ beforeAll(() => {
15
+ childProcess.execSync('pnpm i', {
16
+ cwd: ROOT,
17
+ stdio: 'inherit'
18
+ })
19
+ })
20
+ afterAll(() => {
21
+ fs.unlinkSync(path.resolve(ROOT, 'node_modules'))
22
+ })
23
+
24
+ const prefixes = ['node', 'jiek', 'publish', '--root', ROOT]
25
+ describe('publish', () => {
26
+ test('base', () => {
27
+ process.argv = [...prefixes, '--filter', 'test-foo']
28
+ program.parse(process.argv)
29
+ return actionFuture
30
+ })
31
+ })