Skip to content

Conversation

@trygve-lie
Copy link
Contributor

This changes the return value of the .file() method from being a String to an Object which looks like this:

{
  integrity: 'sha512-zHQjnDpMW7IKVyTpT9cOPT1+xhUSOcbgXj6qHCPSPu1CbQfgwDEsIniXU54zDIN71zqmxLSp3hfIljpt69ok0w==',
  value: 'https://cdn.eik.dev/pkg/mymodue/2.4.1/path/script.js'
}

The main reason for this is to also be able to get hold of other values such as the integrity hashes so we can provide increased security for assets pulled from the CDN.

Copy link
Member

@digitalsadhu digitalsadhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good

@@ -0,0 +1,40 @@
const inspect = Symbol.for('nodejs.util.inspect.custom');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not know about this, nice

@trygve-lie trygve-lie merged commit dc6cd4e into next Mar 19, 2021
@trygve-lie trygve-lie deleted the return-obj branch March 19, 2021 14:13
@github-actions
Copy link

🎉 This PR is included in version 1.0.0-next.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Aug 8, 2022

🎉 This PR is included in version 2.0.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants