Skip to content

Commit 4ecf0c0

Browse files
authored
Release/v2.0.0 (#353)
* Updated readme * Fixed alignment of main heading * Updated changelog for 2.0.0 * Version bump to 2.0.0 * Release v2.0.0
1 parent 9cff52e commit 4ecf0c0

File tree

4 files changed

+51
-28
lines changed

4 files changed

+51
-28
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 2.0.0
6+
- Feature: Apple Silicon [(libnut#49)](https://github.com/nut-tree/libnut/issues/49)
7+
- Enhancement: Enable warning message for missing accessibility permissions on macOS [(#354)](https://github.com/nut-tree/nut.js/issues/354)
8+
- Enhancement: Add runtime typechecks for `screen.find` etc. [(#351)](https://github.com/nut-tree/nut.js/issues/351)
9+
- Bugfix: Fix Windows scaling issue [(#349)](https://github.com/nut-tree/nut.js/issues/349)
10+
- Maintenance: Refine types [(#340)](https://github.com/nut-tree/nut.js/issues/340)
11+
- Maintenance: Cleanup deprecated code [(#341)](https://github.com/nut-tree/nut.js/issues/341)
12+
- Enhancement: Support for mouse capturing games [(#168)](https://github.com/nut-tree/nut.js/issues/168)
13+
- Feature: Provide functions to convert images between BGR and RGB color mode [(#336)](https://github.com/nut-tree/nut.js/issues/336)
14+
- Feature: Audio keys support [(#233)](https://github.com/nut-tree/nut.js/issues/233)
15+
- Enhancement: Configurable interval for `waitFor` [(#312)](https://github.com/nut-tree/nut.js/issues/312)
16+
- Bugfix: Apply pixel density scaling on `colorAt` [(#327)](https://github.com/nut-tree/nut.js/issues/327)
17+
- Enhancement: Change `find` signature to only work on `Image` instances [(#329)](https://github.com/nut-tree/nut.js/issues/329)
18+
- Enhancement: Adjust `assert` class to new `Screen#find` parameter types [(#324)](https://github.com/nut-tree/nut.js/issues/324)
19+
- Feature: Get screen pixel color [(#259)](https://github.com/nut-tree/nut.js/issues/259)
20+
- Feature: Add `Screen#findAll` to enable matching multiple template occurrences [(#320)](https://github.com/nut-tree/nut.js/issues/321)
21+
- Enhancement: Make Screen#find accept `Promise<Image>` [(#320)](https://github.com/nut-tree/nut.js/issues/320)
22+
- Enhancement: Accepting a Buffer with image data for `Screen#find` [(#204)](https://github.com/nut-tree/nut.js/issues/204)
23+
- Enhancement: Get rid of adapter layer in favour of providerRegistry [(#310)](https://github.com/nut-tree/nut.js/issues/310)
24+
- Feature: Provide a default implementation for `ImageReader` and `ImageWriter` [(#307)](https://github.com/nut-tree/nut.js/issues/307)
25+
- Feature: Define interface for mouse movement type [(#130)](https://github.com/nut-tree/nut.js/issues/130)
26+
- Feature: Separate image matching code [(#279)](https://github.com/nut-tree/nut.js/issues/279)
27+
- Enhancement: Export `FileType` [(#301)](https://github.com/nut-tree/nut.js/issues/301)
28+
- Enhancement: Export `ImageWriterParameters` [(#296)](https://github.com/nut-tree/nut.js/issues/296)
29+
- Enhancement: Export provider interfaces [(#294)](https://github.com/nut-tree/nut.js/issues/294)
30+
- Feature: Introduce a registry for providers [(#292)](https://github.com/nut-tree/nut.js/issues/292)
31+
- Feature: Add methods to grab the current screen content as Buffer [(#278)](https://github.com/nut-tree/nut.js/issues/278)
32+
533
## 1.7.0
634
- Enhancement: Trigger snapshot releases [(#234)](https://github.com/nut-tree/nut.js/issues/234)
735
- Feature: Cancel screen.waitFor if needed [(#241)](https://github.com/nut-tree/nut.js/issues/241)

README.md

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010

1111
[![Downloads per month](https://img.shields.io/npm/dm/@nut-tree/nut-js)](https://www.npmjs.com/package/@nut-tree/nut-js)
1212

13-
<p style="text-align: center">
14-
Native UI testing / automation with node.js
13+
<h1 align="center"><a href="https://nutjs.dev">nutjs.dev</a></h1>
14+
15+
<p align="center">
16+
Native UI testing / automation with Node.js
1517
</p>
1618
<br/>
1719

@@ -42,6 +44,10 @@ Check out this demo video to get a first impression of what nut.js is capable of
4244

4345
[![nut.js demo video](https://img.youtube.com/vi/MpIyUJnU_Bk/1.jpg)](https://www.youtube.com/watch?v=MpIyUJnU_Bk)
4446

47+
# Tutorials
48+
49+
Please consult the project website at [nutjs.dev](https://nutjs.dev/docs/tutorial-first_steps/prerequisits) for in-depth tutorials
50+
4551
# Examples
4652

4753
[nut-tree/trailmix](https://github.com/nut-tree/trailmix) contains a set of ready to use examples which demo the usage ot nut.js.
@@ -50,10 +56,6 @@ Check out this demo video to get a first impression of what nut.js is capable of
5056

5157
nut.js provides [public API documentation](https://nut-tree.github.io/apidoc/) auto-generated by [TypeDoc](https://typedoc.org).
5258

53-
# Discussion
54-
55-
In [nut-tree/rfc](https://github.com/nut-tree/rfc) documents regarding larger design / implementation changes in nut.js are up for discussion.
56-
5759
# Community
5860

5961
Feel free to join our [Discord community](https://discord.gg/sJkN7789XR)
@@ -89,11 +91,11 @@ It's work in progress and will undergo constant modification.
8991

9092
## Screen
9193

92-
- [x] Find an image on screen
94+
- [x] Find an image on screen (requires an additional provider package like e.g. [nut-tree/template-matcher](https://www.npmjs.com/package/@nut-tree/template-matcher))
9395
- [x] Find all image occurrences on screen
94-
- [x] Wait for an image to appear on screen
96+
- [x] Wait for an image to appear on screen (requires an additional provider package like e.g. [nut-tree/template-matcher](https://www.npmjs.com/package/@nut-tree/template-matcher))
9597
- [x] Retrieve RGBA color information on screen
96-
- [x] Hooks to trigger actions based on images
98+
- [x] Hooks to trigger actions based on images (requires an additional provider package like e.g. [nut-tree/template-matcher](https://www.npmjs.com/package/@nut-tree/template-matcher))
9799
- [x] Highlighting screen regions
98100

99101
## Integration
@@ -103,12 +105,12 @@ It's work in progress and will undergo constant modification.
103105

104106
# Sample
105107

106-
The following snippet shows a valid `nut.js` example (on macOS)
108+
The following snippet shows a valid `nut.js` example:
107109

108110
```js
109111
"use strict";
110112

111-
const { keyboard, Key, mouse, left, right, up, down, screen } = require("@nut-tree/nut-js");
113+
const { mouse, left, right, up, down, straightTo, centerOf, Region} = require("@nut-tree/nut-js");
112114

113115
const square = async () => {
114116
await mouse.move(right(500));
@@ -117,30 +119,23 @@ const square = async () => {
117119
await mouse.move(up(500));
118120
};
119121

120-
const openSpotlight = async () => {
121-
await keyboard.pressKey(Key.LeftSuper);
122-
await keyboard.pressKey(Key.Space);
123-
await keyboard.releaseKey(Key.Space);
124-
await keyboard.releaseKey(Key.LeftSuper);
125-
};
126-
127122
(async () => {
128123
await square();
129-
await openSpotlight();
130-
await keyboard.type("calculator");
131-
await keyboard.type(Key.Return);
124+
await mouse.move(
125+
straightTo(
126+
centerOf(
127+
new Region(100, 100, 200, 300)
128+
)
129+
)
130+
);
132131
})();
133132
```
134133

135134
# Installation
136135

137-
`nut.js` comes with a pre-built version of OpenCV for your respective target platform.
138-
In order to use these pre-compiled bindings, certain runtime conditions have to be met.
139-
140136
## Prerequisites
141137

142138
This section lists runtime requirements for `nut.js` on the respective target platform.
143-
`nut.js` is built and tested against node 10 and later as well as Electron 4 and later, so in order to use `nut.js` please make sure to use one of these versions.
144139

145140
#### Windows
146141

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@nut-tree/nut-js",
3-
"version": "2.0.0-RC1",
3+
"version": "2.0.0",
44
"license": "Apache-2.0",
55
"main": "dist/index",
66
"typings": "dist/index",
77
"description": "Native system automation for node.js",
88
"author": {
99
"name": "Simon Hofmann",
10-
"email": "dev@simon-hofmann.org",
10+
"email": "kontakt@s1h.org",
1111
"url": "https://s1h.org"
1212
},
1313
"repository": {

0 commit comments

Comments
 (0)