@threlte/gltf 3.0.2 → 3.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/cli.js +7 -4
  3. package/package.json +3 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @threlte/gltf
2
2
 
3
+ ## 3.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 2ee022d: Fix `--output` option being silently ignored
8
+
9
+ ## 3.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - da99fff: Run `knip` and prune unused dependencies and exports
14
+
3
15
  ## 3.0.2
4
16
 
5
17
  ### Patch Changes
package/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict'
3
3
 
4
- import { dirname } from 'node:path'
4
+ import { dirname, parse } from 'node:path'
5
5
  import { fileURLToPath } from 'node:url'
6
6
  import meow from 'meow'
7
7
  import { readPackageUpSync } from 'read-pkg-up'
@@ -75,9 +75,12 @@ if (cli.input.length === 0) {
75
75
  console.log(cli.help)
76
76
  } else {
77
77
  const file = cli.input[0]
78
- const nameExt = file.match(/[-_\w]+[.][\w]+$/i)[0]
79
- const name = nameExt.split('.').slice(0, -1).join('.')
80
- const output = `${name}.svelte`
78
+ const name = parse(file).name
79
+ const output = cli.flags.output
80
+ ? cli.flags.output.endsWith('.svelte')
81
+ ? cli.flags.output
82
+ : `${cli.flags.output}.svelte`
83
+ : `${name}.svelte`
81
84
 
82
85
  try {
83
86
  await gltf(file, output, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threlte/gltf",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "GLTF to Threlte converter",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -31,24 +31,20 @@
31
31
  "@gltf-transform/core": "^4.2.1",
32
32
  "@gltf-transform/extensions": "^4.2.1",
33
33
  "@gltf-transform/functions": "^4.2.1",
34
- "@node-loader/babel": "^2.1.0",
35
34
  "draco3dgltf": "^1.5.7",
36
35
  "jsdom": "^27.1.0",
37
36
  "jsdom-global": "^3.0.2",
38
37
  "keyframe-resample": "^0.1.0",
39
38
  "meow": "^14.0.0",
40
39
  "meshoptimizer": "^0.25.0",
41
- "prettier": "^3.6.2",
42
- "prettier-plugin-svelte": "^3.4.0",
40
+ "prettier": "^3.8.1",
41
+ "prettier-plugin-svelte": "^3.5.1",
43
42
  "read-pkg-up": "^11.0.0",
44
43
  "sharp": "^0.34.5",
45
44
  "svelte": "5.53.6",
46
45
  "three": "0.159.0"
47
46
  },
48
47
  "devDependencies": {
49
- "chalk": "^5.6.2",
50
- "fast-glob": "^3.3.3",
51
- "fs-extra": "^11.3.2",
52
48
  "husky": "^9.1.7",
53
49
  "lint-staged": "^16.2.6",
54
50
  "rimraf": "^6.1.0"