diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 4601d8c4..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,43 +0,0 @@ -version: 2 - -jobs: - build: - macos: - xcode: 10.2.1 - environment: - NODE_VERSION: '12' - steps: - - checkout - - run: - name: install llvm - command: | - brew update - brew install llvm - echo "export PATH=${PATH}:/usr/local/opt/llvm/bin" >> $BASH_ENV - - run: - name: install node.js with nvm - command: | - export NVM_DIR=${HOME}/.nvm - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash - [ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh" - nvm install ${NODE_VERSION} - nvm alias default ${NODE_VERSION} - echo "[ -s \"${NVM_DIR}/nvm.sh\" ] && . \"${NVM_DIR}/nvm.sh\"" >> $BASH_ENV - - run: npm install --build-from-source - - run: npm run ci:circle - - store_test_results: - path: test-results - - store_artifacts: - path: test-results - - run: - name: lint js - command: npm run lint:js - - run: - name: format c++ - command: npm run format && git diff --exit-code -- src/ test/ - #- run: - # name: lint c++ - # command: npm run lint:cpp - - run: - name: deploy on tag - command: git describe --tags --exact >/dev/null 2>&1 && npm run pre-build -- -u ${NODE_PRE_GYP_GITHUB_TOKEN} || true diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml new file mode 100644 index 00000000..9368c9da --- /dev/null +++ b/.github/workflows/continuous-integration-workflow.yml @@ -0,0 +1,25 @@ +name: CI +on: push +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 12 + - name: Set cpp linters + run: | + ln -s "$(brew --prefix llvm)/bin/clang-format" "/usr/local/bin/clang-format" + ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy" + - name: Build from source + run: npm install --build-from-source + - name: lint js + run: npm run lint:js + - name: format c++ + run: npm run format && git diff --exit-code -- src/ test/ + - name: Test + run: npm run test + - name: deploy on tag + run: git describe --tags --exact >/dev/null 2>&1 && npm run pre-build -- -u ${NODE_PRE_GYP_GITHUB_TOKEN} || true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cc6bd567..00000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: node_js -node_js: -- 10 -- 12 -sudo: false -dist: trusty -addons: - apt: - packages: - - clang-3.9 - - build-essential -git: - depth: 10 -env: - global: - - CC=clang - - CXX=clang++ - - npm_config_clang=1 - - secure: rBW+3CfuKKohLPy525/A1W6YezUQ7jxTGauYaDcugwa/jFJciO8xHJUJSBtT0HXL0sxYPGKCeN9uDgp1emMVOON0yYqQu3ia6aWJjrIWh1WQoMgaj67almNzVm8fDEbL17dw57fw3q1hGPmUxeFToIvVYhcTAVMVNfGBjQs5X9gpxOuGvUdd8uDhv/avVTKW5RLXAL9mznfCWeCnsEwMunr4le0FdyJvk2xxd05aj2Xw9VlYzV82e1dazSlbz3eb/QgghG10uuRF2LZyO4k7X82NBBpWml9RM3NwE7NBW1Awqakdd9bBIxmknAZwGQjEEqw2D8DDO1A/qnERhkE9KNIkpOv9wRyZUIFHE3UWZiOIhDPJifGKe5JV8EzGJ6lwePvA7jJxlQJOYXtOKzt91H9gZLIucYtOlMJHc/vo2ZzmhYRblDcQUf1+FSaFyiaC+GH1bJt/MYWYwmCkQSyp8rfKjPGdoTdZ1uyploFWIBuMFmN/X5cniMlhXddmWu8e2HUffpJch7CeFNujwqYrf8TJr7v+YxlWkqUfWIiXlRS1qHy3JsK1D+h11a+FvPLyfVdRLlKtmVmI4kqkxuU6UsVFaKYOBO2XYrXdcaAp3ZX4wdEoQdcwoE+n/72P2vQJVSStLspaK+yr52Vg5wje5EuUbIyLJDzBIqi9H5gjwmM= - - secure: TzA+hIv7XxJXaDls/iH/MjFZQ6z5tNJtkaMJJY8P7L1j9gMLjtrTpsaVyAlV2fqvuHniyydyldm4RcWUiOr6+YopUMjrUzf2TBjXxyeeOfRMvR0lFcKUdroSlhu2AVGcZgYlDM2Hesn7DWoDsN+eXB+fhjrCxunnqzHNv/uYvblK00/qUC+iuTJABqD5yD2aEMEZmnjSsQEcHcCDGQkSKDeZZzhAAIpDE26yqLYKN+c9a16NrLb+8MVHzLu3fWRnjUufS4n5811ck97IP94BXeRbaROXYW79xvzbZsuFyyVoE4CxxdiVrBNYSYUEg7cBAOYBHXWv8xCAi9H0VxzsHOXlyo0V+fG8LyzdRbrvdtl+LlIUCFoMce6P+iFk68rcs6lxIxVMk2WBDo66TENupHzu5nQv4t5MFwILj/taRCIrAiG0tRGGXoAGlcWpmxZIsapseT7+h7JK051LLr0HZz5ZwpijctT/DkKtjJx+x3gbbIUzUJ65Ui7Qj3vgUZFwDCBA7Xc4tHEiWV2KIwk0FewdsBJJkkob093I+JkgjHoJQM98pVB6XrrJk6gPd2njHfowCjIJUpMkS3kC2qKE+ndNMkf1ZFQXZLDj45HZI1aW4iFx1uv5teihX1IJmtLVZL0fE3xoViWsXWlwDz5SA2VUYun5ITpxvBv5ot1gBo0= -before_install: -- npm install -g npm@latest greenkeeper-lockfile@1 -install: -- npm install --build-from-source -before_script: greenkeeper-lockfile-update -script: -- npm run ci:travis -- npm run lint:js -after_script: greenkeeper-lockfile-upload -deploy: - provider: script - script: npm run pre-build -- -u ${NODE_PRE_GYP_GITHUB_TOKEN} - skip_cleanup: true - on: - tags: true -notifications: - email: - on_success: never - on_failure: change diff --git a/README.md b/README.md index bf637f17..dde62dec 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,5 @@ # Atom Filesystem Watcher - -[![Greenkeeper badge](https://badges.greenkeeper.io/atom/watcher.svg)](https://greenkeeper.io/) - -| Linux | Windows | MacOS | -|:------|:-------:|------:| -| [![Build Status](https://travis-ci.org/atom/watcher.svg?branch=master)](https://travis-ci.org/atom/watcher) | [![Build status](https://ci.appveyor.com/api/projects/status/xgm4eg6hbj53cpkl/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/watcher/branch/master) | [![CircleCI](https://circleci.com/gh/atom/watcher/tree/master.svg?style=svg)](https://circleci.com/gh/atom/watcher/tree/master) | - +[![CI](https://github.com/atom/watcher/actions/workflows/ci.yml/badge.svg)](https://github.com/atom/watcher/actions/workflows/ci.yml) **@atom/watcher** is a filesystem watching library for Node.js built to power [Atom](https://atom.io). It prioritizes: * **High fidelity** to the native filesystem watching system calls provided by each operating system. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 19a61cea..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,36 +0,0 @@ -image: Visual Studio 2015 - -cache: - - '%HOMEDRIVE%%HOMEPATH%\.node-gyp' - - '%APPDATA%\npm-cache' - -environment: - nodejs_version: "12" - NODE_PRE_GYP_GITHUB_TOKEN: - secure: izXdqKc3Q97YCK/iHmkf5704WRhBwZXVBn2G+MX/NgyxVJPfwTkZxc8WMET/QZOh - -platform: - - x86 - - x64 - -build: off - -install: - - ps: Install-Product node $env:nodejs_version $env:platform - - npm config set msvs_version 2015 - - npm install --build-from-source - -test_script: -- npm run ci:appveyor -- ps: | - if (($env:APPVEYOR_REPO_TAG -eq 'true') -and $env:NODE_PRE_GYP_GITHUB_TOKEN) { - npm run pre-build -- -u $env:NODE_PRE_GYP_GITHUB_TOKEN 2> $null - if ($LASTEXITCODE -eq 0) { - $host.SetShouldExit(0) - } - } - -shallow_clone: true -clone_depth: 5 - -skip_branch_with_pr: true diff --git a/src/hub.cpp b/src/hub.cpp index afab46d2..bf9b13a4 100644 --- a/src/hub.cpp +++ b/src/hub.cpp @@ -213,12 +213,14 @@ void Hub::handle_events_from(Thread &thread) v8::Local context = Nan::GetCurrentContext(); Local js_event = Nan::New(); js_event->Set(context, - Nan::New("action").ToLocalChecked(), Nan::New(static_cast(fs->get_filesystem_action()))); - js_event->Set(context, - Nan::New("kind").ToLocalChecked(), Nan::New(static_cast(fs->get_entry_kind()))); - js_event->Set(context, - Nan::New("oldPath").ToLocalChecked(), Nan::New(fs->get_old_path()).ToLocalChecked()); - js_event->Set(context, Nan::New("path").ToLocalChecked(), Nan::New(fs->get_path()).ToLocalChecked()); + Nan::New("action").ToLocalChecked(), + Nan::New(static_cast(fs->get_filesystem_action()))); + js_event->Set( + context, Nan::New("kind").ToLocalChecked(), Nan::New(static_cast(fs->get_entry_kind()))); + js_event->Set( + context, Nan::New("oldPath").ToLocalChecked(), Nan::New(fs->get_old_path()).ToLocalChecked()); + js_event->Set( + context, Nan::New("path").ToLocalChecked(), Nan::New(fs->get_path()).ToLocalChecked()); to_deliver[channel_id].push_back(js_event); continue;