@gxp-dev/tools 2.0.66 → 2.0.67

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.
@@ -48,6 +48,7 @@ function createPackageJson(projectPath, projectName, description = "") {
48
48
  version: "1.0.0",
49
49
  description: description || `GxP Plugin: ${projectName}`,
50
50
  main: "main.js",
51
+ type: "module",
51
52
  scripts: {
52
53
  ...DEFAULT_SCRIPTS,
53
54
  placeholder:
@@ -132,6 +133,16 @@ function updateExistingProject(projectPath) {
132
133
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"))
133
134
  let updated = false
134
135
 
136
+ // Ensure "type": "module" so vite.extend.js (and other ESM files) don't
137
+ // trigger Node's MODULE_TYPELESS_PACKAGE_JSON reparse warning.
138
+ // Only set it if the field is missing — don't silently flip a project
139
+ // that has explicitly chosen "commonjs".
140
+ if (!packageJson.type) {
141
+ packageJson.type = "module"
142
+ console.log(' + Setting "type": "module"')
143
+ updated = true
144
+ }
145
+
135
146
  // Check and add/update dependencies
136
147
  if (!packageJson.dependencies) {
137
148
  packageJson.dependencies = {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gxp-dev/tools",
3
- "version": "2.0.66",
3
+ "version": "2.0.67",
4
4
  "description": "Dev tools to create platform plugins",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {
@@ -2,7 +2,7 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
5
+ <link rel="icon" type="image/png" href="/@gx-runtime/logo.png" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>GxP Plugin Builder</title>
8
8
  <script type="module">
Binary file