Migration
Migration guides for new versions of the webnative SDK

Webnative

Version 0.24

The way paths are used throughout the webnative and filesystem APIs has changed.
In earlier versions of webnative, API calls expected UNIX style paths.
1
const bool = await fs.exists("private/some/file")
2
const updatedCID = await fs.mkdir("public/some/directory")
Copied!
In webnative 0.24, paths are created by path helper functions for files and directories.
1
const bool = await fs.exists(wn.path.file("private", "some", "file"))
2
const updatedCID = await fs.mkdir(wn.path.directory("public", "some", "directory"))
Copied!
The docs for the previous API remain available for reference.

Version 0.26.0

The URL for loading webnative from UNPKG has changed. In previous versions, webnative was available as index.umd.js.
1
<script src="https://unpkg.com/[email protected]/dist/index.umd.js"></script>
Copied!
In webnative 0.26, webnative is available as index.min.js.
1
<script src="https://unpkg.com/[email protected]/dist/index.min.js"></script>
Copied!

Version 0.26.1

The URL for loading webnative from UNPKG has changed. In webnative 0.26.0, webnative was available as index.min.js.
1
<script src="https://unpkg.com/[email protected]/dist/index.min.js"></script>
Copied!
We found that some projects needed the UMD build and brought it back in webnative 0.26.1. We have replaced index.min.js with index.umd.min.js.
1
<script src="https://unpkg.com/[email protected]/dist/index.umd.min.js"></script>
Copied!

Version 0.27.0

The type of App returned app.index has changed. Previously, the return type was
1
export type App = {
2
domain: string
3
}
Copied!
In webnative 0.27.0, the the return type is
1
export type App = {
2
domains: string[]
3
insertedAt: string
4
modifiedAt: string
5
}
Copied!
The domain for the app is now in the domains array.
Last modified 1mo ago
Export as PDF
Copy link