skeleton 4.0.0-next.32 → 4.0.0

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 (2) hide show
  1. package/dist/index.js +6 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1136,21 +1136,18 @@ function transformModule(code) {
1136
1136
  file.forEachDescendant((node) => {
1137
1137
  if (Node.isImportSpecifier(node) && ["@skeletonlabs/skeleton-svelte", "@skeletonlabs/skeleton-react"].includes(node.getImportDeclaration().getModuleSpecifier().getLiteralText())) {
1138
1138
  const name = node.getName();
1139
- const newName = IMPORT_MAPPINGS[name];
1140
- if (newName) {
1139
+ if (Object.hasOwn(IMPORT_MAPPINGS, name)) {
1141
1140
  skeletonImports.push(name);
1142
- node.setName(newName);
1141
+ node.setName(IMPORT_MAPPINGS[name]);
1143
1142
  }
1144
1143
  }
1145
1144
  });
1146
1145
  file.forEachDescendant((node) => {
1147
1146
  if (Node.isPropertyAccessExpression(node)) {
1148
1147
  const fullName = `${node.getExpression().getText()}.${node.getName()}`;
1149
- const newName = IDENTIFIER_MAPPINGS[fullName];
1150
- if (newName) node.replaceWithText(newName);
1148
+ if (Object.hasOwn(IDENTIFIER_MAPPINGS, fullName)) node.replaceWithText(IDENTIFIER_MAPPINGS[fullName]);
1151
1149
  } else if (Node.isIdentifier(node) && !Node.isImportSpecifier(node.getParent())) {
1152
- const newName = IDENTIFIER_MAPPINGS[node.getText()];
1153
- if (newName) node.replaceWithText(newName);
1150
+ if (Object.hasOwn(IDENTIFIER_MAPPINGS, node.getText())) node.replaceWithText(IDENTIFIER_MAPPINGS[node.getText()]);
1154
1151
  }
1155
1152
  });
1156
1153
  return {
@@ -1174,7 +1171,7 @@ function transformPackageJson(code) {
1174
1171
  const coerced = coerce(pkg$1[field][dep]);
1175
1172
  if (coerced && lt(coerced.version, "4.0.0")) {
1176
1173
  delete pkg$1[field][dep];
1177
- pkg$1[field][dep] = "next";
1174
+ pkg$1[field][dep] = "^4.0.0";
1178
1175
  }
1179
1176
  }
1180
1177
  pkg$1[field] = sortPropertiesAlphabetically(pkg$1[field]);
@@ -1218,8 +1215,7 @@ function transformCss(s, css) {
1218
1215
  }
1219
1216
  function transformFragment(s, fragment, skeletonImports) {
1220
1217
  walk(fragment, {}, { Component(node, ctx) {
1221
- const newName = IDENTIFIER_MAPPINGS[node.name];
1222
- if (newName && hasRange(node) && skeletonImports.includes(node.name.split(".").at(0) || "")) renameComponent(s, node, newName);
1218
+ if (Object.hasOwn(IDENTIFIER_MAPPINGS, node.name) && hasRange(node) && skeletonImports.includes(node.name.split(".").at(0) || "")) renameComponent(s, node, IDENTIFIER_MAPPINGS[node.name]);
1223
1219
  ctx.next();
1224
1220
  } });
1225
1221
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "skeleton",
3
3
  "description": "The CLI for Skeleton related tooling.",
4
- "version": "4.0.0-next.32",
4
+ "version": "4.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/skeletonlabs/skeleton.git",