Skip to content

Releases: posthtml/posthtml-fetch

v1.2.1

24 Nov 12:36
Compare
Choose a tag to compare

This release updates dependencies and moves to CI from Travis to GitHub Actions.

  • chore: update funding.yml 3c14805
  • ci: remove travis eeb495d
  • ci: add github workflow 3994111
  • build(deps): bump got from 11.1.1 to 11.8.0 1d0570b
  • build: update dev dependencies 1e0272f
  • build(deps): bump posthtml-expressions from 1.4.0 to 1.6.2 5a46e0a
  • build(deps): bump posthtml from 0.13.0 to 0.15.0 569d191
  • build(deps): bump elliptic from 6.5.2 to 6.5.3 c3601b4
  • build(deps): bump lodash from 4.17.15 to 4.17.19 79ed34b

v1.2.0...v1.2.1

v1.2.0

23 May 10:29
Compare
Choose a tag to compare

v1.1.1...v1.2.0

v1.1.1

10 Apr 14:49
Compare
Choose a tag to compare
  • fix: rever position before/after 2ee20af

v1.1.0

10 Apr 14:45
Compare
Choose a tag to compare

This release adds two new options.

plugins

You can now call other plugins that can run before or after the content is fetched:

const posthtml = require('posthtml')
const pf = require('posthtml-fetch')

posthtml()
  .use(pf({
    plugins: {
      after(tree) {
        // Your plugin implementation
      },
      before: [
        tree => {
          // Your plugin implementation
        },
        tree => {
          // Your plugin implementation
        }
      ]
    }
  }))
  .process('<fetch url="https://example.test">{{ response }}</fetch>')
  .then(result => {
    console.log(result.html)
    // => ...interpolated response from https://example.test
  })

preserveTag

Type: boolean
Default: false

You can tell the plugin to preserve the <fetch> tag:

const posthtml = require('posthtml')
const pf = require('posthtml-fetch')

posthtml()
  .use(pf({
    preserveTag: true
  }))
  .process('<fetch url="https://example.test">{{ response }}</fetch>')
  .then(result => {
    console.log(result.html)
    // => <fetch url="https://example.test">...interpolated response from https://example.test</fetch>
  })

v1.0.2

06 Apr 15:32
Compare
Choose a tag to compare
  • chore: update dependencies a92888b

v1.0.1

01 Apr 10:13
Compare
Choose a tag to compare
  • chore: update repo owner name f949eaa

v1.0.0...v1.0.1

v1.0.0

01 Apr 10:11
Compare
Choose a tag to compare

Initial release