@archie/devtools 0.0.16 → 0.0.17

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/dist/index.js CHANGED
@@ -98,7 +98,8 @@ function babelPluginDndAuto({ types: t }, opts = {}) {
98
98
  } else {
99
99
  continue;
100
100
  }
101
- props.push(t.objectProperty(t.identifier(keyName), value));
101
+ const key = /^[a-zA-Z_$][\w$]*$/.test(keyName) ? t.identifier(keyName) : t.stringLiteral(keyName);
102
+ props.push(t.objectProperty(key, value));
102
103
  }
103
104
  return t.objectExpression(props);
104
105
  }
package/dist/index.mjs CHANGED
@@ -71,7 +71,8 @@ function babelPluginDndAuto({ types: t }, opts = {}) {
71
71
  } else {
72
72
  continue;
73
73
  }
74
- props.push(t.objectProperty(t.identifier(keyName), value));
74
+ const key = /^[a-zA-Z_$][\w$]*$/.test(keyName) ? t.identifier(keyName) : t.stringLiteral(keyName);
75
+ props.push(t.objectProperty(key, value));
75
76
  }
76
77
  return t.objectExpression(props);
77
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archie/devtools",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "DevTools for Archie generated applications - Route synchronization and editor communication",
5
5
  "repository": {
6
6
  "type": "git",