-
Notifications
You must be signed in to change notification settings - Fork 3
/
CHANGES
553 lines (329 loc) · 19.8 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
1.2.9-38 | 2024-10-08 15:38:27 +0200
* build(deps): bump syrupy from 4.7.1 to 4.7.2 (dependabot[bot])
1.2.9-36 | 2024-09-16 16:22:23 +0200
* Bump pre-commit hooks (Benjamin Bannier, Corelight)
* Bump deps pinned in pre-commit config to currently used versions (Benjamin Bannier, Corelight)
1.2.9-32 | 2024-09-16 11:50:13 +0000
* build(deps): bump pytest from 8.3.2 to 8.3.3 (dependabot[bot])
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.2 to 8.3.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.2...8.3.3)
---
updated-dependencies:
- dependency-name: pytest
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected]>
* build(deps-dev): bump tree-sitter from 0.22.3 to 0.23.0 (dependabot[bot])
Bumps [tree-sitter](https://github.com/tree-sitter/py-tree-sitter) from 0.22.3 to 0.23.0.
- [Release notes](https://github.com/tree-sitter/py-tree-sitter/releases)
- [Commits](https://github.com/tree-sitter/py-tree-sitter/compare/v0.22.3...v0.23.0)
---
updated-dependencies:
- dependency-name: tree-sitter
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <[email protected]>
* build(deps): bump syrupy from 4.6.1 to 4.7.1 (dependabot[bot])
Bumps [syrupy](https://github.com/syrupy-project/syrupy) from 4.6.1 to 4.7.1.
- [Release notes](https://github.com/syrupy-project/syrupy/releases)
- [Changelog](https://github.com/syrupy-project/syrupy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/syrupy-project/syrupy/compare/v4.6.1...v4.7.1)
---
updated-dependencies:
- dependency-name: syrupy
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <[email protected]>
* build(deps): bump pytest from 8.3.1 to 8.3.2 (dependabot[bot])
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.1 to 8.3.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.1...8.3.2)
---
updated-dependencies:
- dependency-name: pytest
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected]>
* Bump pytest from 8.2.2 to 8.3.1 (dependabot[bot])
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.2 to 8.3.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.2.2...8.3.1)
---
updated-dependencies:
- dependency-name: pytest
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <[email protected]>
* Completely remove old `test/data` (Benjamin Bannier, Corelight)
These test files were used in a couple of tests but didn't need to be
standalone. This patch moves them into `testutils`.
* Bump pylint (Benjamin Bannier, Corelight)
* Bump pre-commit hooks. (Benjamin Bannier, Corelight)
All source changes in this patch are created automatically from `black`.
* Simplify general test data (Benjamin Bannier, Corelight)
This test file is used for e.g., CLI tests and we want to keep it even
with snapshot tests. This patch simplifies it so it is easier to
maintain while still performing some formatting.
* Seed snapshot tests with `test1.zeek` (Benjamin Bannier, Corelight)
* Add test for snapshot testing (Benjamin Bannier, Corelight)
We are currently using a huge file `tests/data/test1.zeek` for manual
"snapshot testing". The idea is that one would add samples to the file
and then manually update the baseline `tests/data/test1.zeek.out`. As
this file grows this manual process becomes very cumbersome.
Additionally when the test fails it can be very hard to identify which
parts of the baseline differed.
This patch introduces a dedicated test `test_samples` which automates
this. The idea is that one would add new compact samples to
`test/samples` which the test discovers automatically. When the test is
run equality assertions are automatically routed to checks against
managed snapshots which can be updated with `pytest --snapshot-update`.
This should reduce overhead from adding/updating snapshots which should
make it easier to add coverage. We will migrate the existing tests over
in follow-up commits.
1.2.9-15 | 2024-06-21 19:44:29 +0200
* Bump actions/setup-python from 4 to 5 (dependabot[bot])
1.2.9-13 | 2024-06-21 19:43:19 +0200
* Bump pre-commit/action from 3.0.0 to 3.0.1 (dependabot[bot])
1.2.9-11 | 2024-06-21 19:43:01 +0200
* Bump actions/upload-artifact from 3 to 4 (dependabot[bot])
1.2.9-9 | 2024-06-21 19:42:11 +0200
* Bump actions/download-artifact from 3 to 4 (dependabot[bot])
1.2.9-7 | 2024-06-21 19:41:47 +0200
* Bump actions/checkout from 3 to 4 (dependabot[bot])
1.2.9-5 | 2024-06-21 19:28:45 +0200
* Stop building binary wheels (Benjamin Bannier, Corelight)
With tree-sitter-zeek providing a proper Python package this project is
script-only.
* Use Python package for tree-sitter-zeek (Benjamin Bannier, Corelight)
tree-sitter-zeek now provides a Python package we can directly depend
on. With this we can avoid building and shipping the generated
tree-sitter bindings. By using the "official upstream API" we can also
simplify the way we parse input.
* Add dependabot config (Benjamin Bannier, Corelight)
* Move more settings into `pyproject.toml` (Benjamin Bannier, Corelight)
This patch largely empties out `setup.py` and instead uses keys
corresponding keys `pyproject.toml`. The only remaining use we have for
`setup.py` is to build Python bindings for tree-sitter-zeek and to
compute a dynamic version from the `VERSION` file tracked in the repo.
1.2.9 | 2024-05-21 10:46:19 +0200
* Release 1.2.9.
1.2.8-3 | 2024-05-21 10:46:09 +0200
* Drop support for EOL python-3.7 (Benjamin Bannier, Corelight)
This version has reached EOL, and tree-sitter stopped publishing updates
for this version some time ago.
* GH-73: Pin tree-sitter dependency (Benjamin Bannier, Corelight)
We use `tree-sitter.Language.build_library` which after a deprecation
cycle went away with tree-sitter-0.22.0. Pin it, at least until we have
migrated off that API.
Closes #73.
1.2.8 | 2023-12-01 11:28:07 +0100
* Skip building pypy wheels on Linux as well (Benjamin Bannier, Corelight)
This also shows segfaults now, so extend the skipped platforms.
* Bump pypa/cibuildwheel GH action (Benjamin Bannier, Corelight)
* Add macos-13, drop macos-11 for CI (Benjamin Bannier, Corelight)
* Remove `pyproject.toml` `[project]` section (Benjamin Bannier, Corelight)
It seems newer versions of the installation toolchain require either the
majority of keywords from `setup.py` declared in `pyproject.toml`, or
none at all (in that case there should be no `[project]` section at
all). As written the project configuration is rejected and it is
impossible to install this package.
Since we use a build controlled by `setup.py` remove the `[project]`
section in `pyproject.toml`.
1.2.7 | 2023-11-07 08:50:02 +0100
* GH-51: Format intervals without space between value and unit (Benjamin Bannier, Corelight)
1.2.6 | 2023-11-03 13:13:45 +0100
* Fix test for Windows line endings (Benjamin Bannier, Corelight)
1.2.5 | 2023-11-03 12:19:41 +0100
* GH-62: Preserve newlines before comments (Benjamin Bannier, Corelight)
* Bump pre-commit hooks (Benjamin Bannier, Corelight)
1.2.4-7 | 2023-09-22 08:41:33 +0200
* Fix race in project Makefile (Benjamin Bannier, Corelight)
The Makefile did not work correctly when used with `-jN` with `N>1`
since `test` did not declare its dependency on `build`.
This patch makes that dependency explicit, and also declares `build` as
PHONY so it is always run.
* Fix file selection of pre-commit hook (Benjamin Bannier, Corelight)
The `files` field expects a regexp, not a shell glob. We'd previously
select any file containing `zeek` in its name instead of files ending in
`.zeek`.
With this patch we use the intended selection.
1.2.4-3 | 2023-09-04 09:57:52 +0200
* Add languages to README code blocks (Benjamin Bannier, Corelight)
* Mention pre-commit hook now that we got a release (Benjamin Bannier, Corelight)
1.2.4 | 2023-09-01 09:50:15 +0200
* Fix mutilated f-strings (Benjamin Bannier, Corelight)
1.2.3-4 | 2023-08-30 12:21:09 +0200
* Drop dependency on pytest in default setup (Benjamin Bannier, Corelight)
We can execute our test suite just fine with built-in tooling, so there
was no need to force developers to install `pytest` by default (they can
still use it though).
1.2.3-2 | 2023-08-29 11:22:17 +0200
* Export pre-commit hook (Benjamin Bannier, Corelight)
This allows directly using this repo as a pre-commit hook.
1.2.3 | 2023-06-21 10:35:46 +0200
* Release 1.2.3.
1.2.1-53 | 2023-06-21 10:35:31 +0200
* Add required version to pyproject.toml (Benjamin Bannier, Corelight)
1.2.1-50 | 2023-05-26 14:04:17 +0200
* Drop unsupported macos-10.15 runner, add macos-12 (Benjamin Bannier, Corelight)
* Fix formatting of index slices (Benjamin Bannier, Corelight)
* Drop manually implemented test runner in favor of pytest. (Benjamin Bannier, Corelight)
* Use testutils-provided `zeekscript` import in tests (Benjamin Bannier, Corelight)
* Refactor tests to use common infrastructure (Christian Kreibich, Corelight)
* Start test cases for the zeekscript.Script class. (Christian Kreibich, Corelight)
* Support text and binary output in zeekscript.Script.write_tree(). (Christian Kreibich, Corelight)
* Avoid trailing whitespace in "zeek-script parse" output. (Christian Kreibich, Corelight)
* Fix black's code formatting that broke f-strings in parse tree output (Christian Kreibich, Corelight)
1.2.1-39 | 2023-05-05 14:54:33 -0700
* Drop unsupported macos-10.15 runner, add macos-12 (Benjamin Bannier, Corelight)
1.2.1-37 | 2023-05-05 09:55:48 -0700
* Remove pylint from CI requirements and README (Christian Kreibich and Benjamin Bannier, Corelight)
* Remove the existing pylint testcase, since pre-commit now covers pylint. (Christian Kreibich, Corelight)
1.2.1-34 | 2023-05-04 18:00:18 -0700
* Run all pylint checkers for pre-commit hook (Benjamin Bannier, Corelight)
* Add pre-commit hook for running pylint (Benjamin Bannier, Corelight)
* Automatically upgrade Python sources with pyupgrade (Benjamin Bannier, Corelight)
* Add pre-commit hook for running pyupgrade (Benjamin Bannier, Corelight)
* Add GH action exercising pre-commit hooks (Benjamin Bannier, Corelight)
* Add `.git-blame-ignore-revs` (Benjamin Bannier, Corelight)
* Format Python sources with Black (Benjamin Bannier, Corelight)
1.2.1-5 | 2023-03-17 17:58:26 -0700
* Reflect removal of init tokens from the grammar (Christian Kreibich, Corelight)
* Allow identity comparison for Node objects (Christian Kreibich, Corelight)
1.2.1-2 | 2023-03-01 10:58:16 -0800
* Bump Github actions to current versions (Christian Kreibich, Corelight)
1.2.1 | 2023-02-28 22:38:13 -0800
* Release 1.2.1.
* GH-9: Pull in tree-sitter-zeek bump to fix handling of "bare" minor comments (Christian Kreibich, Corelight)
This also expands the general formatting test by including the construct that
triggered zeek/tree-sitter-zeek#9.
1.2.0 | 2022-12-15 14:41:07 -0800
* Release 1.2.0.
1.1.0-59 | 2022-11-22 21:02:45 -0800
* Bump tree-sitter-zeek submodule for &group addition (Christian Kreibich, Corelight)
1.1.0-58 | 2022-09-08 21:25:27 -0700
* Expand README to cover build instructions (Christian Kreibich, Corelight)
1.1.0-56 | 2022-09-06 22:16:02 -0700
* Add ability to surpress output for parse (Otto Fowler)
* Suppress pylint false positive on E1131 and "|" (Christian Kreibich, Corelight)
* Bump cibuildwheel action to 2.9.0 (Christian Kreibich, Corelight)
* Bump tree-sitter-zeek submodule for &broker_allow_complex_type fix (Christian Kreibich, Corelight)
1.1.0-50 | 2022-05-18 12:14:21 -0700
* Focus the string concatenation layout heuristic on ... strings (Christian Kreibich, Corelight)
* Ensure square brackets on index slices do not linebreak (Christian Kreibich, Corelight)
1.1.0-47 | 2022-05-17 23:13:38 -0700
* Skip PyPy on MacOS too, it suffers spurious segfaults in CI (Christian Kreibich, Corelight)
* Update README (Christian Kreibich, Corelight)
* Disable fail-fast for the build matrix (Christian Kreibich, Corelight)
* Fix permissions on a test script (Christian Kreibich, Corelight)
1.1.0-42 | 2022-05-17 16:59:20 -0700
* Refactor linewrap decision logic to aid troubleshooting (Christian Kreibich, Corelight)
* Threshold tweak in linewrap logic: allow smaller excess chunk size (Christian Kreibich, Corelight)
* Fix a few instances where linewraps before ";" were still permitted (Christian Kreibich, Corelight)
* GH-3: Improve linebreaks in enum declarations and initializer lists (Christian Kreibich, Corelight)
* Move node traversal logic from Script to Node class (Christian Kreibich, Corelight)
* Comment-only tweaks (Christian Kreibich, Corelight)
* Use space separation when defining specific enum values (Christian Kreibich, Corelight)
* Avoid double-space after capture list in when-statements (Christian Kreibich, Corelight)
1.1.0-33 | 2022-05-17 16:51:32 -0700
* Update formatting testcases to Whitesmith (Christian Kreibich, Corelight)
* GH-9: Move to Whitesmith indentation (Christian Kreibich, Corelight)
* Expand formatting testcase with a few more scenarios (Christian Kreibich, Corelight)
1.1.0-29 | 2022-04-27 20:52:57 -0700
* Skip the PyPy builds on Windows (Christian Kreibich, Corelight)
* Move formatters to using Node.nonerr_children where required (Christian Kreibich, Corelight)
* When building up parse tree, track non-error nodes separately (Christian Kreibich, Corelight)
* Switch all script tree navigation to our cloned tree, not the TS one (Christian Kreibich, Corelight)
* Variable naming in the Formatter._format_child() method was backward (Christian Kreibich, Corelight)
* Disallow formatting multiple files without --inplace; better summary message (Christian Kreibich, Corelight)
* Write problems to stderr when hitting parse errors during formatting (Christian Kreibich, Corelight)
* Add unit tests for testing parsing errors and their formatting (Christian Kreibich, Corelight)
* Refactor format-testing setup a bit to be more reusable (Christian Kreibich, Corelight)
* Appease pylint (Christian Kreibich, Corelight)
* Exit formatting with error also when parsing encounters problems (Christian Kreibich, Corelight)
* Handle TreeSitter's ERROR-typed nodes explicitly (Christian Kreibich, Corelight)
1.1.0-15 | 2022-04-27 13:56:52 -0700
* Include directory recursion tests on Windows (Christian Kreibich, Corelight)
* Fix writing formatted output on Windows (Christian Kreibich, Corelight)
* Expand testsuite to verify portable newline handling (Christian Kreibich, Corelight)
* Ignore built shared-library artifacts on Windows (Christian Kreibich, Corelight)
1.1.0-10 | 2022-04-27 09:50:22 -0700
* Make the pylint tests optional (Christian Kreibich, Corelight)
1.1.0-8 | 2022-04-25 11:10:01 -0700
* Support flushing the OutputStream on close, and do so when formatting (Christian Kreibich, Corelight)
* Strip trailing whitespace properly (Christian Kreibich, Corelight)
* Add intentional trailing whitespace to formatting test file (Christian Kreibich, Corelight)
1.1.0-4 | 2022-04-19 13:47:41 -0700
* Modernize pyproject.toml (Christian Kreibich, Corelight)
1.1.0-2 | 2022-03-17 14:05:22 -0700
* Update README to reflect recent functionality (Christian Kreibich, Corelight)
1.1.0 | 2022-03-15 12:13:34 -0700
* This is 1.1.0. (Christian Kreibich, Corelight)
1.0.2-6 | 2022-03-15 12:11:15 -0700
* Address some pylint warnings (Christian Kreibich, Corelight)
* Support recursive descent on directories when formatting scripts (Christian Kreibich, Corelight)
1.0.2-3 | 2022-03-15 10:57:26 -0700
* Add --version|-v to zeek-script and zeek-format to report version (Christian Kreibich, Corelight)
* Include the VERSION file in the source distribution (Christian Kreibich, Corelight)
1.0.2 | 2022-03-14 17:25:50 -0700
* This is 1.0.2 (Christian Kreibich, Corelight)
1.0.1-1 | 2022-03-14 15:59:19 -0700
* Tweaks to prepare for migration to github.com/zeek/zeek (Christian Kreibich, Corelight)
1.0.1 | 2022-03-14 14:13:22 -0700
* This is 1.0.1. (Christian Kreibich, Corelight)
0.2.0-44 | 2022-03-14 12:25:25 -0700
* Expand README (Christian Kreibich, Corelight)
0.2.0-42 | 2022-03-11 23:48:44 -0800
* Expand Github action: build sdist, push to PyPI (Christian Kreibich, Corelight)
0.2.0-40 | 2022-03-11 22:29:49 -0800
* Add linebreak support. (Christian Kreibich, Corelight)
- Avoid line breaks when a single excess bit is itself too long for a line.
- Add a hidden flag to suppress wrapping of long lines
- Style tweak: add spaces inside "( <expr> )"
- Style tweak: add space between negation operator and operand
- Bugfix in switch-case: forgot newline before first case
- Indentation bugfix around mixed {}-use in if-else-statements.
- Make regular parsing errors non-fatal
- Include node error state in the output of "zeek-script parse"
- Prevent linebreaks after the opening "[" of an indexing expression
- Better handling of field assignment expression lists
- Neither indent nor line-wrap "preprocessor" directives
- Robustness fix for preventing breaks around $foo=<expr> field assignments
- Add heuristic to avoid breaking very short excess bits onto new line
- Simplify the handling of NO_LB_BEFORE hint
- Use alignment logic of AND/OR expression chains also for "+"
- Expand formatting testcase to cover alignment of multi-clause booleans
- Move to K&R-style opening-brace placement for functions/events/hooks
- Expand formatting testcase and simplify DOS-format testing
- Bugfix: avoid erroneous space alignment after comments
- Additional rules for when to avoid linebreaks
- Broadly introduce linebreak hinting throughout the formatters
- Ensure that attributes with assignment don't get linewrapped
- Establish hinting that makes comments not count toward max line length
- Simplify Formatter._get_child()
- Add Formatter.content(), reporting the script content to format
- Support line buffering in OutputStream class
- Add notion of linebreak hinting in the Formatter class tree
- Make a number of Formatter class members public
- Additional comments and minor stylistic tweaks
- Bump tree-sitter grammar to pull in initializer-list fix
0.2.0-8 | 2022-03-02 15:15:24 -0800
* Differentiate named and unnamed TS nodes (Christian Kreibich, Corelight)
0.2.0-6 | 2022-02-17 17:08:16 -0800
* GH-2: Update parser to pull in directive updates and reflect name changes (Christian Kreibich, Corelight)
0.2.0-3 | 2022-02-14 17:24:59 -0800
* Switch tree-sitter-zeek submodule URL to Zeek project (Christian Kreibich, Corelight)
0.2.0-2 | 2022-02-11 18:43:53 -0800
* Fix CI badge in README and slightly tweak wording (Christian Kreibich, Corelight)
* Explicitly require at least Python 3.7 (Christian Kreibich, Corelight)
0.2.0 | 2022-02-11 18:24:02 -0800
* Starting CHANGES.