Comparing version 20.0.0-pre.1 to 20.0.0-pre.2
{ | ||
"name": "bs-sedlex", | ||
"version": "20.0.0-pre.1", | ||
"version": "20.0.0-pre.2", | ||
"sources": [ | ||
@@ -5,0 +5,0 @@ { |
{ | ||
"name": "bs-sedlex", | ||
"version": "20.0.0-pre.1", | ||
"version": "20.0.0-pre.2", | ||
"description": "An OCaml lexer generator for Unicode", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
"node-jq": "^1.3.1", | ||
"ppx-sedlex": "=20.0.0-pre.1" | ||
"ppx-sedlex": "=20.0.0-pre.2" | ||
}, | ||
@@ -23,0 +23,0 @@ "peerDependencies": { |
@@ -30,11 +30,37 @@ <h1><img alt='Maintenance status: maintained' src="https://img.shields.io/maintenance/yes/2019.svg?style=popout-square&logo=verizon&logoColor=000000" align=right><a href="https://github.com/ELLIOTTCABLE/bs-sedlex/releases" align=right><img alt='Latest npm release' src="https://img.shields.io/npm/v/bs-sedlex.svg?style=popout-square&logo=npm&label=bs%20version" align=right></a><a target="_blank" href="https://travis-ci.com/ELLIOTTCABLE/bs-sedlex" align=right><img alt='Build status on Travis-CI' src="https://img.shields.io/travis/com/ELLIOTTCABLE/bs-sedlex.svg?style=popout-square&logo=travis&label=bs%20build" align=right></a><a target="_blank" href="https://twitter.com/intent/follow?screen_name=ELLIOTTCABLE" align=right><img alt='Follow my work on Twitter' src="https://img.shields.io/twitter/follow/ELLIOTTCABLE.svg?style=popout-square&logo=twitter&label=%40ELLIOTTCABLE&color=blue" align=right></a> | ||
1. Install this fork through [npm][] (this will automatically install `ppx-sedlex` as well, as it's | ||
a transitive dependency): | ||
1. If you're writing an app or a similar end-consumer project, install the peerDependencies of this | ||
project via [npm][], including the BuckleScript compiler and the [`bs-uchar`][bs-uchar] shim. | ||
See that package's README for details on selecting the appropriate versions of these | ||
dependencies; but briefly, choose either `bs-platform` 4 or 5 ... | ||
```sh | ||
$ npm install --save bs-platform@latest # 4.x.x || 5.x.x, corresponding to OCaml 4.02 | ||
$ npm install --save bs-uchar@latest # 0.x.x | ||
``` | ||
... or, the new `bs-platform` 6: | ||
```sh | ||
$ npm install --save bs-platform@next # >= 6.0.0, corresponding to OCaml 4.06 | ||
$ npm install --save bs-uchar@next # 1.x.x | ||
``` | ||
(Worh repeating: *do not add these dependencies to a library.* See [a more thorough | ||
discussion][uchar-notes] in the `bs-uchar` README; but basically, shims like `bs-uchar` should | ||
only be installed in the final consumer project that's selecting the `bs-platform` version.) | ||
2. Add the ppx transformer into `"devDependencies"`: | ||
```sh | ||
$ npm install --save-dev ppx-sedlex | ||
``` | ||
3. Add the runtime package (this one!) to your direct `"dependencies"`, for both libraries and apps: | ||
```sh | ||
$ npm install --save bs-sedlex | ||
``` | ||
2. Manually add the runtime package, `bs-sedlex`, to your `bsconfig.json`'s | ||
`bs-dependencies` field: | ||
4. Manually add both the runtime package (`bs-sedlex`) and Uchar-shim (`bs-uchar`) to your | ||
`bsconfig.json`'s `bs-dependencies` field: | ||
@@ -44,2 +70,3 @@ ```diff | ||
... | ||
+ "bs-uchar", | ||
+ "bs-sedlex" | ||
@@ -49,3 +76,3 @@ ], | ||
3. Additionally tell BuckleScript to apply the `ppx-sedlex` syntax-transformer over your source-code | ||
5. Additionally tell BuckleScript to apply the `ppx-sedlex` syntax-transformer over your source-code | ||
by adding a `ppx-flags` field at the root level of the same `bsconfig.json`. (Note that, | ||
@@ -64,7 +91,30 @@ unintuitively, this is *not* a relative path; it follows the format `package-name/file-path`.) | ||
4. Write blazing-fast, type-safe, and Unicode-aware / multilingual lexers and parsers galore! | ||
6. Write blazing-fast, type-safe, and Unicode-aware / multilingual lexers and parsers galore! | ||
[npm]: <https://www.npmjs.com/> | ||
"npm, the package-manager for the JavaScript ecosystem" | ||
[bs-uchar]: <https://github.com/ELLIOTTCABLE/bs-uchar#readme> | ||
"A BuckleScript-ported shim for the core OCaml Uchar.t type" | ||
[uchar-notes]: <https://github.com/ELLIOTTCABLE/bs-uchar#versioning--libraries> | ||
"Detailed description of the issues involved in adding an ML shim to an intermediate libarary" | ||
## Versioning of this package | ||
Thanks to [SemVer not including a ‘generation’ number][semver-213], there's really no way I can | ||
reasonably tie this project's version on npm to the upstream version of Sedlex as released by the | ||
community maintainers. As ugly as it is, I've opted to pin the *major version* of `bs-sedlex`, to | ||
the *flattened* major and minor versions of the upstream project. | ||
I started doing this with Sedlex 2.0; thus, the mapping looks like this: | ||
| Sedlex | `bs-sedlex` | | ||
| --------- | ----------- | | ||
| `v1.99.4` | `v1.99.4` | | ||
| `v2.0` | `v20.0.x` | | ||
Correspondingly, this project can't really strictly adhere to SemVer. Tentatively, I intend to use | ||
the ‘minor’ field for breaking changes to the port, and the ‘patch’ field for everything else. | ||
[semver-213]: <https://github.com/semver/semver/issues/213#issuecomment-266914818> | ||
"A discussion around extending SemVer with an additional, human-focused major component" | ||
## Parser-writing tips from a fellow JavaScripter | ||
@@ -71,0 +121,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
343995
408