Skip to content

Commit 254ab7a

Browse files
committed
Update docs to clarify version & link to v1
1 parent fb65445 commit 254ab7a

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ For more information, see the project's documentation site: [**eemeli.org/yaml**
1111
To install:
1212

1313
```sh
14-
npm install yaml
14+
npm install yaml@next
1515
```
1616

17-
Note: `yaml` 0.x and 1.x are rather different implementations. For the earlier `yaml`, see [tj/js-yaml](https://github.com/tj/js-yaml).
17+
**Note:** These docs are for `yaml@2`. For v1, see the [v1.10.0 tag](https://github.com/eemeli/yaml/tree/v1.10.0) for the source and [eemeli.org/yaml/v1](https://eemeli.org/yaml/v1/) for the documentation.
1818

1919
## API Overview
2020

@@ -33,11 +33,11 @@ const YAML = require('yaml')
3333

3434
### YAML Documents
3535

36-
- [`YAML.createNode(value, wrapScalars, tag): Node`](https://eemeli.org/yaml/#creating-nodes)
3736
- [`YAML.defaultOptions`](https://eemeli.org/yaml/#options)
3837
- [`YAML.Document`](https://eemeli.org/yaml/#yaml-documents)
39-
- [`constructor(options)`](https://eemeli.org/yaml/#creating-documents)
38+
- [`constructor(value, options)`](https://eemeli.org/yaml/#creating-documents)
4039
- [`defaults`](https://eemeli.org/yaml/#options)
40+
- [`#createNode(value, options): Node`](https://eemeli.org/yaml/#creating-nodes)
4141
- [`#anchors`](https://eemeli.org/yaml/#working-with-anchors)
4242
- [`#contents`](https://eemeli.org/yaml/#content-nodes)
4343
- [`#errors`](https://eemeli.org/yaml/#errors)

docs/01_intro.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
> To install:
44
55
```sh
6-
npm install yaml
6+
npm install yaml@next
77
# or
8-
yarn add yaml
8+
yarn add yaml@next
99
```
1010

1111
`yaml` is a new definitive library for [YAML](http://yaml.org/), a human friendly data serialization standard. This library:
@@ -19,6 +19,8 @@ The library is released under the ISC open source license, and the code is [avai
1919

2020
For the purposes of versioning, any changes that break any of the endpoints or APIs documented here will be considered semver-major breaking changes. Undocumented library internals may change between minor versions, and previous APIs may be deprecated (but not removed).
2121

22+
**Note:** These docs are for `yaml@2`. For v1, see the [v1.10.0 tag](https://github.com/eemeli/yaml/tree/v1.10.0) for the source and [eemeli.org/yaml/v1](https://eemeli.org/yaml/v1/) for the documentation.
23+
2224
## API Overview
2325

2426
The API provided by `yaml` has three layers, depending on how deep you need to go: [Parse & Stringify](#parse-amp-stringify), [Documents](#documents), and the [CST Parser](#cst-parser). The first has the simplest API and "just works", the second gets you all the bells and whistles supported by the library along with a decent [AST](#content-nodes), and the third is the closest to YAML source, making it fast, raw, and crude.

docs/index.html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: YAML
33

44
toc_footers:
5-
- <a href='https://github.com/eemeli/yaml/releases'>Version <span id='version'>1.x.y</span> (changelog)</a>
5+
- <a href='https://github.com/eemeli/yaml/releases'>Version <span id='version'>2.x.y</span> (changelog)</a>
66
- <a href='https://github.com/eemeli/yaml'>github.com/eemeli/yaml</a>
77
- <a href='https://www.npmjs.com/package/yaml'><code>npm install yaml</code></a>
88

0 commit comments

Comments
 (0)