ember-vite-hmr 1.7.0 → 1.8.1

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.
@@ -270,9 +270,10 @@ function hotReplaceAst(babel) {
270
270
  const specifierName = ((_b = specifier.imported) === null || _b === void 0 ? void 0 : _b.name) ||
271
271
  ((_c = specifier.imported) === null || _c === void 0 ? void 0 : _c.value) ||
272
272
  'default';
273
+ // const timestamp = Date.now();
273
274
  const ast = (0, core_1.parse)(`
274
275
  (async () => {
275
- const c = await import('/ember-vite-hmr/virtual/component:${source}:${specifierName}.gjs?timestamp=${Date.now()}');
276
+ const c = await import('/ember-vite-hmr/virtual/component:${source}:${specifierName}.gjs');
276
277
  ${exports.hotAstProcessor.meta.importVar}.${imp} = c.default;
277
278
  })()
278
279
  import.meta.hot.accept('/ember-vite-hmr/virtual/component:${source}:${specifierName}.gjs', (c) => {
package/dist/lib/hmr.js CHANGED
@@ -79,7 +79,7 @@ function getYieldsFromFile(filename, noCache) {
79
79
  }
80
80
  const content = (0, fs_1.readFileSync)(filename).toString();
81
81
  // very basic, todo: make this use AST
82
- const matches = content.matchAll(/to=['"](\w+)['"]/g);
82
+ const matches = content.matchAll(/to=['"\\]+(\w+)['"\\]+/g);
83
83
  const yields = new Set([...matches].map((m) => m === null || m === void 0 ? void 0 : m[1]).filter((m) => !!m));
84
84
  if (noCache) {
85
85
  return {
@@ -124,6 +124,7 @@ function hmr(enableViteHmrForModes = ['development']) {
124
124
  return this.resolve(id, importer);
125
125
  }
126
126
  if (id.startsWith(virtualPrefix)) {
127
+ console.log('virtualPrefix id', id);
127
128
  return id;
128
129
  }
129
130
  if (id.startsWith('/@id/embroider_virtual:')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-vite-hmr",
3
- "version": "1.7.0",
3
+ "version": "1.8.1",
4
4
  "keywords": [
5
5
  "ember-addon"
6
6
  ],
@@ -56,7 +56,7 @@
56
56
  "@babel/plugin-proposal-decorators": "^7.23.2",
57
57
  "@babel/plugin-transform-class-static-block": "^7.20.0",
58
58
  "@babel/runtime": "^7.17.0",
59
- "@embroider/addon-dev": "^5.0.0",
59
+ "@embroider/addon-dev": "^6.0.1",
60
60
  "@embroider/compat": "^3.4.6",
61
61
  "@embroider/core": "^3.4.6",
62
62
  "@glint/core": "^1.2.0",
@@ -85,7 +85,7 @@
85
85
  "ember-source": "^5.10.1",
86
86
  "@glimmer/component": "^1.1.2",
87
87
  "ember-template-lint": "^6.0.0",
88
- "eslint": "^8.33.0",
88
+ "eslint": "^9.12.0",
89
89
  "eslint-config-prettier": "^9.0.0",
90
90
  "eslint-plugin-ember": "^12.2.0",
91
91
  "eslint-plugin-n": "^17.9.0",