Skip to content

Releases: hazae41/glacier

1.1.8 - Stricter Result

12 Dec 14:08
Compare
Choose a tag to compare

BREAKING CHANGE

  • Result<D,E> is now stricter, you can either have data but no error, or error but no data
async function fetcher(url: string) {
  // ✅
  return { data: { name: "John Smith" } }

  // ✅
  return { error: new Error() }

  // ❌
  return { data: { name: "John Smith" }, error: new Error() }
}

1.1.6 - Added React Native example

03 Nov 14:48
Compare
Choose a tag to compare
  • added Expo (React Native) example

1.1.5

03 Nov 13:34
Compare
Choose a tag to compare

moved test in another repo

1.1.4

27 Oct 08:18
Compare
Choose a tag to compare
bump

1.1.2 - The sandbox update

26 Oct 20:46
Compare
Choose a tag to compare
  • Added CodeSandbox

1.1.0 - The rename update

26 Oct 15:45
Compare
Choose a tag to compare

BREAKING CHANGES

  • Renamed "Handle" to "Query"
  • Renamed "Object" to "Instance"
  • Renamed "use" to "useQuery"
  • Renamed "single" to "getSingleSchema"
  • Renamed "scroll" to "getScrollSchema"
  • Renamed "useSingle" to "useSingleQuery"
  • Renamed "useScroll" to "useScrollQuery"
  • XSWR. is no longer needed (but still works)

Schemas become:

function getHelloSchema() {
  return getSingleSchema<Hello>("/api/hello", fetchAsJson)
}

Mixtures become:

function useAutoFetchMixture(query: Query) {
  useFetch(query)
  useVisible(query)
  useOnline(query)
}

Mixes become:

function useHelloMix() {
  const query = useQuery(getHelloSchema, [])
  useAutoFetchMixture(query)
  return query
}

1.0.95 - The second bundle update

11 Oct 15:55
Compare
Choose a tag to compare

NO BREAKING CHANGES

CHANGES

  • Removed bunchee in favor of rollup => less bugs
  • No longer bundled/minified => easier debugging
  • Added source maps => easier debugging
  • Moved tslib as peerDependency => reduced bundle size

1.0.89 - The bundle update

10 Oct 18:12
Compare
Choose a tag to compare

NO BREAKING CHANGES

CHANGES

  • type: module in package.json
  • moved react as a peerDependency => reduced bundle size

1.0.86 - The real update

05 Oct 16:18
Compare
Choose a tag to compare

CHANGES

  • Updaters now yield Result instead of State: only allows data, error, and times (e.g. can't modify aborter in yield)
  • Added new member realData in States, Handles and Objects: it allows you to get the real, non-optimistic data

1.0.85 - The update

05 Oct 14:47
Compare
Choose a tag to compare
  • Updated deps
  • Cleaned tsconfig
  • Commits and releases are now GPG signed