@jitsi/robotjs 0.6.5 → 0.6.9

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.
package/README.md CHANGED
@@ -170,6 +170,13 @@ I like AutoHotkey, but I like Node.js more. By developing RobotJS I get an AutoH
170
170
 
171
171
  **TLDR:** There's nothing like AutoHotkey on Mac, so I'm making it.
172
172
 
173
+ ## Publishing
174
+
175
+ 1. Increment the version: `npm version patch`
176
+ 2. Push to github: `git push --follow-tags`
177
+ 3. Create and publish Github release: `gh release create v1.2.3`, replacing v1.2.3 with the actual release number
178
+ 4. Github action will prebuildify and publish release to npm
179
+
173
180
  ## License
174
181
 
175
182
  MIT
package/binding.gyp CHANGED
@@ -6,6 +6,14 @@
6
6
  'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
7
7
  'CLANG_CXX_LIBRARY': 'libc++',
8
8
  'MACOSX_DEPLOYMENT_TARGET': '10.7',
9
+ 'OTHER_CFLAGS': [
10
+ '-arch x86_64',
11
+ '-arch arm64'
12
+ ],
13
+ 'OTHER_LDFLAGS': [
14
+ '-arch x86_64',
15
+ '-arch arm64'
16
+ ]
9
17
  },
10
18
  'msvs_settings': {
11
19
  'VCCLCompilerTool': { 'ExceptionHandling': 1 },
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var robotjs = require('./build/Release/robotjs.node');
1
+ var robotjs = require('node-gyp-build')(__dirname);
2
2
 
3
3
  module.exports = robotjs;
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jitsi/robotjs",
3
- "version": "0.6.5",
3
+ "version": "0.6.9",
4
4
  "description": "Node.js Desktop Automation.",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -9,9 +9,12 @@
9
9
  "test:darwin:linux": "jasmine test/**/*.js",
10
10
  "test-keyboard": "node test/keyboard.js",
11
11
  "test:win32": "jasmine test/**/*.js",
12
- "install": "prebuild-install || node-gyp rebuild",
13
- "install-debug": "prebuild-install || node-gyp rebuild --debug",
14
- "prebuild": "prebuild --all"
12
+ "install": "node-gyp-build",
13
+ "prebuild": "prebuildify -t 16.0.0 --napi --strip",
14
+ "prebuild-darwin-universal": "prebuildify -t 16.0.0 --napi --strip --arch x64+arm64",
15
+ "prebuild-linux-x64": "prebuildify -t 16.0.0 --napi --strip",
16
+ "prebuild-win32-x86": "prebuildify -t 16.0.0 --napi --strip",
17
+ "prebuild-win32-x64": "prebuildify -t 16.0.0 --napi --strip"
15
18
  },
16
19
  "repository": {
17
20
  "type": "git",
@@ -48,11 +51,11 @@
48
51
  "homepage": "https://github.com/jitsi/robotjs",
49
52
  "dependencies": {
50
53
  "node-addon-api": "^4.2.0",
51
- "prebuild-install": "^5.3.3"
54
+ "node-gyp-build": "^4.3.0"
52
55
  },
53
56
  "devDependencies": {
54
57
  "jasmine": "^2.99.0",
55
- "prebuild": "^11.0.0",
58
+ "prebuildify": "^5.0.0",
56
59
  "run-script-os": "^1.0.3",
57
60
  "tape": "^4.8.0",
58
61
  "targetpractice": "0.0.7"
package/src/robotjs.cc CHANGED
@@ -509,10 +509,9 @@ Napi::Value keyTapWrapper(const Napi::CallbackInfo& info)
509
509
 
510
510
  MMKeyFlags flags = MOD_NONE;
511
511
  MMKeyCode key;
512
- const char *k;
513
512
 
514
- Napi::String kstr(env, info[0].ToString());
515
- k = kstr.Utf8Value().c_str();
513
+ std::string kstr = info[0].As<Napi::String>();
514
+ const char *k = kstr.c_str();
516
515
 
517
516
  switch (info.Length())
518
517
  {
@@ -1,6 +0,0 @@
1
- ## How to contribute
2
-
3
- * Please try to match the style of the code around the feature/bug you're working on.
4
- * Use tabs not spaces.
5
- * Please make sure your pull request only includes changes to the lines you're working on. For example, disable the whitespace extension when using Atom.
6
- * All pull requests must include code for every platform (Mac, Windows, and Linux) before they can be merged. The exception is platform specific features. Feel free to submit a pull request with code for one platform and others can fill in the gaps to help get it merged.
@@ -1,32 +0,0 @@
1
- <!--- Provide a general summary of the issue in the Title above. -->
2
-
3
- ## Expected Behavior
4
- <!--- If you're describing a bug, tell us what should happen. -->
5
- <!--- If you're suggesting a change/improvement, tell us how it should work. -->
6
-
7
- ## Current Behavior
8
- <!--- If describing a bug, tell us what happens instead of the expected behavior. -->
9
- <!--- If suggesting a change/improvement, explain the difference from current behavior. -->
10
-
11
- ## Possible Solution
12
- <!--- Not obligatory, but suggest a fix/reason for the bug, -->
13
- <!--- or ideas how to implement the addition or change. -->
14
-
15
- ## Steps to Reproduce (for bugs)
16
- <!--- Please provide an unambiguous set of steps to reproduce this bug. -->
17
- <!--- Include code to reproduce. -->
18
- 1.
19
- 2.
20
- 3.
21
- 4.
22
-
23
- ## Context
24
- <!--- How has this issue affected you? What are you trying to accomplish? -->
25
- <!--- Providing context helps us come up with a solution that is most useful in the real world. -->
26
-
27
- ## Your Environment
28
- <!--- Include as many relevant details about the environment you experienced the bug in. -->
29
- * RobotJS version:
30
- * Node.js version:
31
- * npm version:
32
- * Operating System:
@@ -1,34 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- pull_request:
5
- release:
6
- types:
7
- - published
8
-
9
- jobs:
10
- build:
11
- name: Build on ${{ matrix.os }}
12
- runs-on: ${{ matrix.os }}
13
- strategy:
14
- fail-fast: false
15
- matrix:
16
- os: [ubuntu-20.04, windows-2019, macos-11]
17
- steps:
18
- - uses: actions/checkout@v2
19
- - uses: actions/setup-node@v2
20
- with:
21
- node-version: '16'
22
- - name: Install dependencies
23
- if: startsWith(matrix.os, 'ubuntu')
24
- run: sudo apt-get install libxtst-dev libpng++-dev
25
- - run: npm install
26
- - name: Release prebuilt artifacts
27
- if: github.event_name == 'release' && github.event.action == 'published'
28
- run: npx prebuild --all -r napi -u ${{ secrets.GITHUB_TOKEN }}
29
- - name: Release prebuilt artifacts (mac arm64)
30
- if: github.event_name == 'release' && github.event.action == 'published' && startsWith(matrix.os, 'macos')
31
- run: npx prebuild --all -r napi --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
32
- - name: Release prebuilt artifacts (win ia32)
33
- if: github.event_name == 'release' && github.event.action == 'published' && startsWith(matrix.os, 'windows')
34
- run: npx prebuild --all -r napi --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
package/.travis.yml DELETED
@@ -1,62 +0,0 @@
1
- sudo: false
2
- language: cpp
3
-
4
- env:
5
- matrix:
6
- - TRAVIS_NODE_VERSION="8"
7
- - TRAVIS_NODE_VERSION="10"
8
- - TRAVIS_NODE_VERSION="12"
9
- - TRAVIS_NODE_VERSION="stable"
10
-
11
- os:
12
- - linux
13
- - osx
14
-
15
- cache:
16
- directories:
17
- - node_modules
18
-
19
- git:
20
- depth: 5
21
-
22
- addons:
23
- apt:
24
- sources:
25
- - ubuntu-toolchain-r-test
26
- packages:
27
- - libx11-dev
28
- - zlib1g-dev
29
- - libpng12-dev
30
- - libxtst-dev
31
- - g++-4.8
32
- - gcc-4.8
33
-
34
- before_install:
35
- - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh
36
- - nvm install $TRAVIS_NODE_VERSION
37
- - PATH=$PATH:`pwd`/node_modules/.bin
38
- # print versions
39
- - node --version
40
- - npm --version
41
-
42
- # use g++-4.8 on Linux
43
- - if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
44
- - $CXX --version
45
-
46
- install:
47
- - npm install
48
-
49
- script:
50
- - if [ "$TRAVIS_OS_NAME" = "osx" ]; then npm test; fi
51
- - if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run npm test; fi
52
-
53
- after_success:
54
- - if [[ $TRAVIS_TAG != "" ]]; then npm run prebuild -- -u $GITHUB_TOKEN; fi
55
-
56
- notifications:
57
- webhooks:
58
- urls:
59
- - https://webhooks.gitter.im/e/e737dd5170be50cdba95
60
- on_success: change
61
- on_failure: always
62
- on_start: never
package/appveyor.yml DELETED
@@ -1,41 +0,0 @@
1
- # http://www.appveyor.com/docs/appveyor-yml
2
-
3
- # Test against these versions of Io.js and Node.js.
4
- environment:
5
- matrix:
6
- # node.js
7
- - nodejs_version: "10"
8
- - nodejs_version: "12"
9
- - nodejs_version: "14"
10
- - nodejs_version: "Stable"
11
-
12
- cache:
13
- - node_modules
14
-
15
- clone_depth: 5
16
-
17
- platform:
18
- - x86
19
- - x64
20
-
21
- # Install scripts. (runs after repo cloning)
22
- install:
23
- # Get the latest stable version of Node 0.STABLE.latest
24
- - ps: Install-Product node $env:nodejs_version
25
- - npm -g install npm
26
- - set PATH=%APPDATA%\npm;%PATH%
27
- # Typical npm stuff.
28
- - npm install
29
-
30
- test_script:
31
- # Output useful info for debugging.
32
- - node --version
33
- - npm --version
34
- # run tests
35
- - npm test
36
-
37
- on_success:
38
- - IF defined APPVEYOR_REPO_TAG_NAME npm run prebuild -- -u %GITHUB_TOKEN%
39
-
40
- build: off
41
- version: "{build}"