@primate/htmx 0.9.1 → 0.10.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/package.json +2 -2
  2. package/src/module.js +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primate/htmx",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Primate HTMX module",
5
5
  "bugs": "https://github.com/primatejs/packages/issues",
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  "directory": "packages/htmx"
15
15
  },
16
16
  "dependencies": {
17
- "htmx.org": "^1.8.6",
17
+ "htmx.org": "^1.9.0",
18
18
  "runtime-compat": "^0.15.1"
19
19
  },
20
20
  "peerDependencies": {
package/src/module.js CHANGED
@@ -35,8 +35,11 @@ export default directory => ({
35
35
  },
36
36
  async publish(app, next) {
37
37
  const src = "htmx.js";
38
- const path = ["node_modules", "htmx.org", "dist", src];
39
- const code = await Path.resolve().join(...path).file.read();
38
+ const scriptPath = ["node_modules", "htmx.org", "dist", src];
39
+ const path = import.meta.resolve === undefined
40
+ ? await Path.resolve().join(...scriptPath)
41
+ : new Path(await import.meta.resolve("htmx.org"));
42
+ const code = await path.file.read();
40
43
  await app.publish({src, code, type: "module"});
41
44
  app.bootstrap({type: "script", code: `import * as htmx from "./${src}";`});
42
45
  return next(app);