unframer 2.2.0 → 2.2.2

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/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "unframer",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "",
5
+ "sideEffects": false,
5
6
  "repository": "https://github.com/remorses/unframer",
6
7
  "bin": "bin.js",
7
8
  "files": [
@@ -51,8 +52,8 @@
51
52
  "@types/node": "^20.5.7",
52
53
  "@xmorse/deployment-utils": "^0.1.0",
53
54
  "posthtml": "^0.16.6",
54
- "react": "^18.2.0",
55
- "react-dom": "^18.2.0"
55
+ "react": "^18.3.0",
56
+ "react-dom": "^18.3.0"
56
57
  },
57
58
  "scripts": {
58
59
  "build": "rm -rf dist && tsc -m esnext --outDir esm && tsc && cp ../README.md ./README.md && cp ./src/framer.d.ts ./dist/framer.d.ts && cp ./src/framer.d.ts ./esm/framer.d.ts",
package/src/exporter.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Plugin, build, transform, context, BuildResult } from 'esbuild'
2
+ import url from 'url'
2
3
 
3
4
  import { Sema } from 'async-sema'
4
5
  import dprint from 'dprint-node'
@@ -486,8 +487,9 @@ export async function extractPropControlsUnsafe(
486
487
  const delimiter = '__delimiter__'
487
488
  let propCode = `JSON.stringify({propertyControls: x.default?.propertyControls, fonts: x?.default?.fonts } || {}, null, 2)`
488
489
  const nodePath = process.execPath || 'node'
490
+ const fileUrl = url.pathToFileURL(filename).href
489
491
  const code = `import(${JSON.stringify(
490
- filename,
492
+ fileUrl,
491
493
  )}).then(x => { console.log(${JSON.stringify(
492
494
  delimiter,
493
495
  )}); console.log(${propCode}) })`