@exercism/codemirror-lang-php 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +37 -25
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.1
2
+
3
+ The README is restructured. This release is the first published from GitHub Actions, with npm provenance.
4
+
1
5
  ## 1.0.0
2
6
 
3
7
  This is Exercism's first release of the package, published as
package/README.md CHANGED
@@ -2,30 +2,16 @@
2
2
 
3
3
  # @codemirror/lang-php [![NPM version](https://img.shields.io/npm/v/@codemirror/lang-php.svg)](https://www.npmjs.org/package/@codemirror/lang-php)
4
4
 
5
- [ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://code.haverbeke.berlin/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/) | [**CHANGELOG**](https://code.haverbeke.berlin/codemirror/lang-php/src/branch/main/CHANGELOG.md) ]
6
-
7
- This package implements PHP language support for the
8
- [CodeMirror](https://codemirror.net/) code editor.
9
-
10
- The [project page](https://codemirror.net/) has more information, a
11
- number of [examples](https://codemirror.net/examples/) and the
12
- [documentation](https://codemirror.net/docs/).
13
-
14
- This code is released under an
15
- [MIT license](https://code.haverbeke.berlin/codemirror/lang-php/tree/main/LICENSE).
16
-
17
- We aim to be an inclusive, welcoming community. To make that explicit,
18
- we have a [code of
19
- conduct](http://contributor-covenant.org/version/1/1/0/) that applies
20
- to communication around the project.
21
-
22
5
  ## Exercism's fork
23
6
 
24
- This is Exercism's fork of `@codemirror/lang-php`, published as
25
- `@exercism/codemirror-lang-php`. Our changes live on the `exercism`
26
- branch. The grammar comes from Exercism's fork of `@lezer/php`,
27
- `@exercism/lezer-php`, which parses a few things that are errors in the official grammar (`function from()`, `foreach ($xs as &$x)` and mixed-case
28
- `Class` and `Static`).
7
+ This is Exercism's fork of [@codemirror/lang-php](https://code.haverbeke.berlin/codemirror/lang-php).
8
+ Exercism uses it in the PHP editor on [exercism.org](https://exercism.org).
9
+ It is published on npm as `@exercism/codemirror-lang-php`.
10
+ Our changes are on the `exercism` branch, and the `main` branch follows upstream.
11
+ Below this section, the README is upstream's.
12
+
13
+ The grammar comes from `@exercism/lezer-php`, Exercism's fork of `@lezer/php`.
14
+ It parses a few things that are errors in the official grammar: `function from()`, `foreach ($xs as &$x)`, and mixed-case `Class` and `Static`.
29
15
 
30
16
  The fork adds completion to `php()`:
31
17
 
@@ -41,17 +27,43 @@ The fork adds completion to `php()`:
41
27
  `self::`, `static::`, `parent::` or a class name, its static
42
28
  members, constants and enum cases
43
29
 
44
- PHP variables belong to the whole function, so a function sees only its own variables, and none of the variables at the top level of the file. An arrow
45
- function also sees the variables around it. Completion offers nothing inside strings and comments.
30
+ In PHP, a function can use only its own variables, so inside a function completion offers none of the variables at the top level of the file.
31
+ Inside an arrow function, it also offers the variables around it. Completion offers nothing inside strings and comments.
46
32
 
47
- To use it, install it from npm:
33
+ ### Install
48
34
 
49
35
  ```
50
36
  npm install @exercism/codemirror-lang-php
51
37
  ```
52
38
 
39
+ ### Building and testing
40
+
53
41
  To build and test it from a checkout, run `npm install` (which also builds the package), then `npm test`.
54
42
 
43
+ ### Contributing
44
+
45
+ Contributions to this fork follow the Exercism [Code of Conduct](https://exercism.org/docs/using/legal/code-of-conduct).
46
+ Please read about how to [contribute to Exercism](https://exercism.org/docs/building).
47
+
48
+ ---
49
+
50
+ [ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://code.haverbeke.berlin/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://code.haverbeke.berlin/codemirror/lang-php/src/branch/main/CHANGELOG.md) ]
51
+
52
+ This package implements PHP language support for the
53
+ [CodeMirror](https://codemirror.net/) code editor.
54
+
55
+ The [project page](https://codemirror.net/) has more information, a
56
+ number of [examples](https://codemirror.net/examples/) and the
57
+ [documentation](https://codemirror.net/docs/).
58
+
59
+ This code is released under an
60
+ [MIT license](https://code.haverbeke.berlin/codemirror/lang-php/tree/main/LICENSE).
61
+
62
+ We aim to be an inclusive, welcoming community. To make that explicit,
63
+ we have a [code of
64
+ conduct](http://contributor-covenant.org/version/1/1/0/) that applies
65
+ to communication around the project.
66
+
55
67
  ## Usage
56
68
 
57
69
  ```javascript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exercism/codemirror-lang-php",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "PHP language support for the CodeMirror code editor, with completion, for Exercism",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",