@driveflux/fab 1.0.0-next.0 → 1.0.0-next.1

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.
@@ -1,13 +1,14 @@
1
-
2
- > @driveflux/fab@1.0.0-next.0 build /Users/flux/Projects/flux/packages/fab
3
- > pnpm build:js && pnpm build:types
4
-
5
-
6
- > @driveflux/fab@1.0.0-next.0 build:js /Users/flux/Projects/flux/packages/fab
7
- > swc src -d dist
8
-
9
- Successfully compiled: 7 files with swc (69.51ms)
10
-
11
- > @driveflux/fab@1.0.0-next.0 build:types /Users/flux/Projects/flux/packages/fab
12
- > tsc --build --emitDeclarationOnly
13
-
1
+
2
+ 
3
+ > @driveflux/fab@1.0.0-next.1 build /Users/flux/Projects/flux/packages/fab
4
+ > pnpm build:js && pnpm build:types
5
+
6
+
7
+ > @driveflux/fab@1.0.0-next.1 build:js /Users/flux/Projects/flux/packages/fab
8
+ > swc src --strip-leading-paths -d dist
9
+
10
+ Successfully compiled: 7 files with swc (341.42ms)
11
+
12
+ > @driveflux/fab@1.0.0-next.1 build:types /Users/flux/Projects/flux/packages/fab
13
+ > tsc --build --emitDeclarationOnly
14
+
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @driveflux/fab
2
2
 
3
+ ## 1.0.0-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - verion bump + minor improvements
8
+
3
9
  ## 1.0.0-next.0
4
10
 
5
11
  ### Major Changes
package/bin/fab.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // @ts-check
3
- import { Argument, Command, Option } from 'commander'
3
+ import { Command, Option } from 'commander'
4
4
  import path from 'node:path'
5
5
  import { build, buildCjs, buildEsm, buildTypes, clean, create, makeBaseExports, parseConfig } from '../index.js'
6
6
  const program = new Command()
@@ -37,12 +37,13 @@ function makeBuildCommand() {
37
37
  'The exports definition as an alternative to package.json. It must be the same structure as "exports"',
38
38
  parseExports
39
39
  )
40
- .addArgument(
41
- new Argument('[command]', 'The command to run')
40
+ .addOption(
41
+ new Option('-t, --target [...target]', 'The target export to make')
42
42
  .choices(['all', 'esm', 'cjs', 'types', 'clean', 'cjs-exports'])
43
43
  .default('all')
44
44
  )
45
- .action(async (command, options) => {
45
+ .action(async (options) => {
46
+ const { target } = options
46
47
  const cwd = path.resolve(process.cwd(), options.cwd)
47
48
  const config = await parseConfig({ cwd })
48
49
 
@@ -56,7 +57,7 @@ function makeBuildCommand() {
56
57
  ...config,
57
58
  }
58
59
 
59
- switch (command) {
60
+ switch (target) {
60
61
  case 'all':
61
62
  await build(finalOptions)
62
63
  break
@@ -73,7 +74,7 @@ function makeBuildCommand() {
73
74
  await buildTypes(finalOptions)
74
75
  break
75
76
  default:
76
- throw new Error(`Unknown command ${command}`)
77
+ throw new Error(`Unknown target ${target}`)
77
78
  }
78
79
  })
79
80
  }
package/dist/build.js CHANGED
@@ -289,6 +289,7 @@ export var buildCjs = function() {
289
289
  runCommand("pnpm", [
290
290
  "swc",
291
291
  "src",
292
+ "--strip-leading-paths",
292
293
  "-C",
293
294
  "module.type=commonjs",
294
295
  "-d",
@@ -688,6 +689,7 @@ export var buildEsm = function() {
688
689
  runCommand("pnpm", [
689
690
  "swc",
690
691
  "src",
692
+ "--strip-leading-paths",
691
693
  "-d",
692
694
  (_options_destination = options.destination) !== null && _options_destination !== void 0 ? _options_destination : getDefaultOptions().destination
693
695
  ], {