cem-plugin-wrec 0.1.2 → 0.1.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.
package/index.js CHANGED
@@ -43,7 +43,8 @@ export default function wrecPlugin() {
43
43
  switch (node.kind) {
44
44
  case Kind.ClassDeclaration:
45
45
  const className = node.name.getText();
46
- const heritage = node.heritageClauses[0];
46
+ const { heritageClauses } = node;
47
+ const heritage = heritageClauses ? heritageClauses[0] : null;
47
48
  if (heritage) {
48
49
  const superclass = heritage.types[0].expression.getText();
49
50
  if (superclass === "Wrec") {
@@ -59,7 +60,7 @@ export default function wrecPlugin() {
59
60
  },
60
61
  });
61
62
  currentClass = moduleDoc?.declarations?.find(
62
- (declaration) => declaration.name === className
63
+ (declaration) => declaration.name === className,
63
64
  );
64
65
  }
65
66
  }
@@ -115,14 +116,14 @@ export default function wrecPlugin() {
115
116
  // Runs for each module, after analyzing, all information about your module should now be available
116
117
  moduleLinkPhase({ moduleDoc, context }) {
117
118
  const classes = moduleDoc?.declarations?.filter(
118
- (declaration) => declaration.kind === "class"
119
+ (declaration) => declaration.kind === "class",
119
120
  );
120
121
 
121
122
  for (const aClass of classes) {
122
123
  const { members } = aClass;
123
124
  if (members) {
124
125
  aClass.members = members.filter(
125
- (member) => !MEMBERS_TO_HIDE.has(member.name)
126
+ (member) => !MEMBERS_TO_HIDE.has(member.name),
126
127
  );
127
128
  }
128
129
  }
package/my-counter.js CHANGED
@@ -1,4 +1,4 @@
1
- import Wrec from "wrec";
1
+ import { Wrec } from "wrec";
2
2
 
3
3
  /**
4
4
  * This is a counter web component.
package/package.json CHANGED
@@ -5,12 +5,15 @@
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "type": "module",
8
- "version": "0.1.2",
8
+ "version": "0.1.4",
9
+ "scripts": {
10
+ "reinstall": "rm -rf node_modules package-lock.json && npm install"
11
+ },
9
12
  "devDependencies": {
10
- "@custom-elements-manifest/analyzer": "^0.1.14",
11
- "globby": "^11.0.3",
12
- "nodemon": "^2.0.7",
13
- "typescript": "^4.3.2",
14
- "uvu": "^0.5.1"
13
+ "@custom-elements-manifest/analyzer": "^0.11.0",
14
+ "globby": "^16.1.0",
15
+ "nodemon": "^3.1.11",
16
+ "typescript": "^5.9.3",
17
+ "uvu": "^0.5.6"
15
18
  }
16
19
  }