Hanami Assets manifest in wrong place

@krzykamil OK, I think I’ve figured it out! There was something bogus in your package-lock.json, where the 2.1.0 version of hanami assets had a "resolved" URL still pointing to a commit in the GitHub repo:

"node_modules/hanami-assets": {
  "version": "2.1.0",
  "resolved": "git+ssh://git@github.com/hanami/assets-js.git#0627aa2a5fe2784f80d5590b070548085123f882",

This stood out to me because all the other packages in that file had "resolved" URLs pointing to the proper NPM registry, e.g.

"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",

Since hanami-assets 2.1.0 is a proper release in NPM, I wondered why it didn’t have a registry.npmjs.org URL like the one above.

To fix this in your app, I blew away package-lock.json as well as node_modules, and reinstalled fresh:

rm -rf package-lock.json node_modules
npm i

This resulted in the following section of diff for package-lock.json:

     "node_modules/hanami-assets": {
       "version": "2.1.0",
-      "resolved": "git+ssh://git@github.com/hanami/assets-js.git#0627aa2a5fe2784f80d5590b070548085123f882",
-      "license": "MIT",
+      "resolved": "https://registry.npmjs.org/hanami-assets/-/hanami-assets-2.1.0.tgz",
+      "integrity": "sha512-nOanYSZgATOrZofZXUwH7E1usTMbnECptaB6nfZCqNuE3QFCpRinOhdGJ8ndZPc1wEKVrs4VS85dQ0fLCa87Iw==",
       "dependencies": {
         "esbuild": "^0.19.0",
         "fs-extra": "^11.1.0",

That’s looking better!

Then a bundle exec hanami assets compile resulted in the following public/assets/_main/assets.json:

{
  "app.js": {
    "url": "/assets/_main/app-FIQKTEJF.js"
  },
  "app.css": {
    "url": "/assets/_main/app-RRZUBCGY.css"
  },
  "favicon.ico": {
    "url": "/assets/_main/favicon-B8DAB077.ico"
  },
  "lib1.png": {
    "url": "/assets/_main/lib1-27767CE5.png"
  },
  "lib2.png": {
    "url": "/assets/_main/lib2-FBDB69C0.png"
  },
  "lib3.png": {
    "url": "/assets/_main/lib3-E9481CEB.png"
  },
  "seshat.png": {
    "url": "/assets/_main/seshat-F66A7922.png"
  },
  "NotoSans-Bold.ttf": {
    "url": "/assets/_main/NotoSans-Bold-F3484BDF.ttf"
  },
  "NotoSans-BoldItalic.ttf": {
    "url": "/assets/_main/NotoSans-BoldItalic-84A524F9.ttf"
  },
  "NotoSans-Italic.ttf": {
    "url": "/assets/_main/NotoSans-Italic-D5B99C1B.ttf"
  },
  "NotoSans-Regular.ttf": {
    "url": "/assets/_main/NotoSans-Regular-9A3CE638.ttf"
  }
}

Perfect!

So: there’s no bug in the 2.1.0 release of hanami-assets.

Somehow your app locked in a version in git that wasn’t doing the right thing. Interestingly, the 0627aa2a5fe2784f80d5590b070548085123f882 sha is actually a commit in this currently open pull request, so I think we just need to be extra careful about testing that before merging and making a new release.

Let me know how you go in light of the information above!