{"id":49370,"library":"sketch-polyfill-fetch","title":"sketch-polyfill-fetch","description":"A fetch polyfill for Sketch plugins, version 0.5.2 (latest). Provides a lightweight fetch API implementation inspired by unfetch, specifically for use within Sketch plugin contexts. It is automatically included when using the skpm build tool, but can be installed separately. Only supports HTTPS due to macOS limitations. No active development or releases since 2018.","status":"maintenance","version":"0.5.2","language":"javascript","source_language":"en","source_url":"https://github.com/skpm/sketch-polyfill-fetch","tags":["javascript","sketch","fetch","polyfill"],"install":[{"cmd":"npm install sketch-polyfill-fetch","lang":"bash","label":"npm"},{"cmd":"yarn add sketch-polyfill-fetch","lang":"bash","label":"yarn"},{"cmd":"pnpm add sketch-polyfill-fetch","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM default import is recommended when using skpm; CommonJS require also works but is the skpm-less pattern.","wrong":"const fetch = require('sketch-polyfill-fetch')","symbol":"fetch","correct":"import fetch from 'sketch-polyfill-fetch'"},{"note":"CommonJS require is used without skpm; the package exports a single default function.","wrong":"","symbol":"fetch","correct":"const fetch = require('sketch-polyfill-fetch')"},{"note":"Named exports for Headers, Request, Response are also available for polyfill completeness.","wrong":"","symbol":"Headers","correct":"import { Headers } from 'sketch-polyfill-fetch'"}],"quickstart":{"code":"import fetch from 'sketch-polyfill-fetch';\n\nexport default function() {\n  fetch('https://jsonplaceholder.typicode.com/todos/1')\n    .then(response => response.json())\n    .then(data => console.log(data))\n    .catch(err => console.error(err));\n}","lang":"javascript","description":"Shows how to use the fetch polyfill in a Sketch plugin with skpm, making an HTTPS GET request."},"warnings":[{"fix":"Always use https:// URLs in fetch calls.","message":"Only HTTPS URLs are supported due to macOS limitations in Sketch; HTTP requests will fail.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"If targeting Sketch 71+, remove the polyfill and use native fetch.","message":"The package is deprecated; fetch is natively available in newer Sketch versions (>=71).","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.5.2':12 '2018':58 'activ':53 'api':18 'automat':32 'build':38 'context':29 'develop':54 'due':48 'fetch':4,6,17,61 'https':47 'implement':19 'includ':33 'inspir':20 'instal':43 'javascript':59 'latest':13 'lightweight':16 'limit':51 'maco':50 'plugin':10,28 'polyfil':3,7,62 'provid':14 'releas':56 'separ':44 'sinc':57 'sketch':2,9,27,60 'sketch-polyfill-fetch':1 'skpm':37 'specif':23 'support':46 'tool':39 'unfetch':22 'use':25,35 'version':11 'within':26","created_at":"2026-06-07T17:01:25.026639+00:00","updated_at":"2026-06-07T17:01:25.026639+00:00","problems":[{"fix":"Change URL to https://","cause":"Using http:// URL instead of https://","error":"Network request failed"},{"fix":"Add import fetch from 'sketch-polyfill-fetch' or const fetch = require('sketch-polyfill-fetch')","cause":"Missing import or using without skpm in a non-global context","error":"fetch is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/skpm/sketch-polyfill-fetch#readme","github":"https://github.com/skpm/sketch-polyfill-fetch","docs":null,"changelog":null,"pypi":null,"npm":"sketch-polyfill-fetch","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}