Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ version: 2
jobs:
build:
macos:
xcode: 8.3.3
xcode: 10.2.1
environment:
- NODE_VERSION: "8"
NODE_VERSION: '12'
steps:
- checkout
- run:
Expand Down Expand Up @@ -35,9 +35,9 @@ jobs:
- 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: 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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- 8
- 10
- 12
sudo: false
dist: trusty
addons:
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cache:
- '%APPDATA%\npm-cache'

environment:
nodejs_version: "8"
nodejs_version: "12"
NODE_PRE_GYP_GITHUB_TOKEN:
secure: izXdqKc3Q97YCK/iHmkf5704WRhBwZXVBn2G+MX/NgyxVJPfwTkZxc8WMET/QZOh

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atom/watcher",
"version": "1.3.1",
"version": "1.3.2",
"description": "Atom filesystem watcher",
"main": "lib/index.js",
"bin": "lib/cli.js",
Expand Down Expand Up @@ -61,7 +61,7 @@
"dependencies": {
"event-kit": "2.5.3",
"fs-extra": "7.0.1",
"nan": "2.13.1",
"nan": "2.14.1",
"prebuild-install": "5.2.5"
},
"standard": {
Expand Down
25 changes: 5 additions & 20 deletions src/message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ FileSystemPayload::FileSystemPayload(ChannelID channel_id,
EntryKind entry_kind,
string &&old_path,
string &&path) :
channel_id{channel_id},
action{action},
entry_kind{entry_kind},
old_path{move(old_path)},
path{move(path)}
channel_id{channel_id}, action{action}, entry_kind{entry_kind}, old_path{move(old_path)}, path{move(path)}
{
//
}
Expand Down Expand Up @@ -86,12 +82,7 @@ CommandPayload::CommandPayload(CommandAction action,
uint_fast32_t arg,
bool recursive,
size_t split_count) :
id{id},
action{action},
root{move(root)},
arg{arg},
recursive{recursive},
split_count{split_count}
id{id}, action{action}, root{move(root)}, arg{arg}, recursive{recursive}, split_count{split_count}
{
//
}
Expand Down Expand Up @@ -139,10 +130,7 @@ string CommandPayload::describe() const
}

AckPayload::AckPayload(CommandID key, ChannelID channel_id, bool success, string &&message) :
key{key},
channel_id{channel_id},
success{success},
message{move(message)}
key{key}, channel_id{channel_id}, success{success}, message{move(message)}
{
//
}
Expand All @@ -155,9 +143,7 @@ string AckPayload::describe() const
}

ErrorPayload::ErrorPayload(ChannelID channel_id, std::string &&message, bool fatal) :
channel_id{channel_id},
message{move(message)},
fatal{fatal}
channel_id{channel_id}, message{move(message)}, fatal{fatal}
{
//
}
Expand All @@ -172,8 +158,7 @@ string ErrorPayload::describe() const
}

StatusPayload::StatusPayload(RequestID request_id, unique_ptr<Status> &&status) :
request_id{request_id},
status{move(status)}
request_id{request_id}, status{move(status)}
{
//
}
Expand Down
7 changes: 1 addition & 6 deletions src/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,7 @@ class CommandPayloadBuilder
uint_fast32_t arg,
bool recursive,
size_t split_count) :
id{NULL_COMMAND_ID},
action{action},
root{std::move(root)},
arg{arg},
recursive{recursive},
split_count{split_count}
id{NULL_COMMAND_ID}, action{action}, root{std::move(root)}, arg{arg}, recursive{recursive}, split_count{split_count}
{}

CommandID id;
Expand Down
10 changes: 2 additions & 8 deletions src/polling/directory_record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ using std::shared_ptr;
using std::string;

DirectoryRecord::DirectoryRecord(string &&prefix) :
parent{nullptr},
name{move(prefix)},
populated{false},
was_present{false}
parent{nullptr}, name{move(prefix)}, populated{false}, was_present{false}
{
//
}
Expand Down Expand Up @@ -218,10 +215,7 @@ size_t DirectoryRecord::count_entries() const
}

DirectoryRecord::DirectoryRecord(DirectoryRecord *parent, string &&name) :
parent{parent},
name(move(name)),
populated{false},
was_present{false}
parent{parent}, name(move(name)), populated{false}, was_present{false}
{
//
}
Expand Down
5 changes: 1 addition & 4 deletions src/polling/polled_root.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ using std::move;
using std::string;

PolledRoot::PolledRoot(string &&root_path, ChannelID channel_id, bool recursive) :
root(new DirectoryRecord(move(root_path))),
channel_id{channel_id},
iterator(root, recursive),
all_populated{false}
root(new DirectoryRecord(move(root_path))), channel_id{channel_id}, iterator(root, recursive), all_populated{false}
{
//
}
Expand Down
9 changes: 2 additions & 7 deletions src/polling/polling_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@ using std::shared_ptr;
using std::string;

PollingIterator::PollingIterator(const shared_ptr<DirectoryRecord> &root, bool recursive) :
root(root),
recursive{recursive},
current(root),
current_path(root->path()),
phase{PollingIterator::SCAN}
root(root), recursive{recursive}, current(root), current_path(root->path()), phase{PollingIterator::SCAN}
{
//
}

BoundPollingIterator::BoundPollingIterator(PollingIterator &iterator, ChannelMessageBuffer &buffer) :
buffer{buffer},
iterator{iterator}
buffer{buffer}, iterator{iterator}
{
//
}
Expand Down
4 changes: 1 addition & 3 deletions src/polling/polling_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ using std::unique_ptr;
using std::vector;

PollingThread::PollingThread(uv_async_t *main_callback) :
Thread("polling thread", main_callback),
poll_interval{DEFAULT_POLL_INTERVAL},
poll_throttle{DEFAULT_POLL_THROTTLE}
Thread("polling thread", main_callback), poll_interval{DEFAULT_POLL_INTERVAL}, poll_throttle{DEFAULT_POLL_THROTTLE}
{
freeze();
}
Expand Down
8 changes: 2 additions & 6 deletions src/worker/linux/cookie_jar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,13 @@ using std::string;
using std::unique_ptr;

Cookie::Cookie(ChannelID channel_id, std::string &&from_path, EntryKind kind) noexcept :
channel_id{channel_id},
from_path(move(from_path)),
kind{kind}
channel_id{channel_id}, from_path(move(from_path)), kind{kind}
{
//
}

Cookie::Cookie(Cookie &&other) noexcept :
channel_id{other.channel_id},
from_path(move(other.from_path)),
kind{other.kind}
channel_id{other.channel_id}, from_path(move(other.from_path)), kind{other.kind}
{
//
}
Expand Down
6 changes: 1 addition & 5 deletions src/worker/linux/watched_directory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ WatchedDirectory::WatchedDirectory(int wd,
shared_ptr<WatchedDirectory> parent,
string &&name,
bool recursive) :
wd{wd},
channel_id{channel_id},
parent{parent},
name{move(name)},
recursive{recursive}
wd{wd}, channel_id{channel_id}, parent{parent}, name{move(name)}, recursive{recursive}
{
//
}
Expand Down
12 changes: 2 additions & 10 deletions src/worker/macos/batch_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ using std::ostream;
using std::string;

Event::Event(BatchHandler &batch, std::string &&event_path, FSEventStreamEventFlags flags) :
handler{batch},
event_path{move(event_path)},
flags{flags},
former{nullptr},
current{nullptr}
handler{batch}, event_path{move(event_path)}, flags{flags}, former{nullptr}, current{nullptr}
{
//
}
Expand Down Expand Up @@ -213,11 +209,7 @@ BatchHandler::BatchHandler(ChannelMessageBuffer &message_buffer,
RenameBuffer &rename_buffer,
bool recursive,
const string &root_path) :
cache{cache},
message_buffer{message_buffer},
rename_buffer{rename_buffer},
recursive{recursive},
root_path{root_path}
cache{cache}, message_buffer{message_buffer}, rename_buffer{rename_buffer}, recursive{recursive}, root_path{root_path}
{
//
}
Expand Down
10 changes: 2 additions & 8 deletions src/worker/macos/rename_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,13 @@ using std::string;
using std::vector;

RenameBufferEntry::RenameBufferEntry(RenameBufferEntry &&original) noexcept :
entry(move(original.entry)),
event_path(move(original.event_path)),
current{original.current},
age{original.age}
entry(move(original.entry)), event_path(move(original.event_path)), current{original.current}, age{original.age}
{
//
}

RenameBufferEntry::RenameBufferEntry(shared_ptr<PresentEntry> entry, string event_path, bool current) :
entry{move(entry)},
event_path{move(event_path)},
current{current},
age{0}
entry{move(entry)}, event_path{move(event_path)}, current{current}, age{0}
{
//
}
Expand Down
5 changes: 1 addition & 4 deletions src/worker/macos/subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ Subscription::Subscription(ChannelID channel_id,
bool recursive,
string &&root,
RefHolder<FSEventStreamRef> &&event_stream) :
channel_id{channel_id},
root{move(root)},
recursive{recursive},
event_stream{move(event_stream)}
channel_id{channel_id}, root{move(root)}, recursive{recursive}, event_stream{move(event_stream)}
{
//
}
Expand Down
5 changes: 1 addition & 4 deletions src/worker/recent_file_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ ostream &operator<<(ostream &out, const StatResult &result)
}

PresentEntry::PresentEntry(std::string &&path, EntryKind entry_kind, uint64_t inode, uint64_t size) :
StatResult(move(path), entry_kind),
inode{inode},
size{size},
last_seen{steady_clock::now()}
StatResult(move(path), entry_kind), inode{inode}, size{size}, last_seen{steady_clock::now()}
{
//
}
Expand Down
3 changes: 1 addition & 2 deletions src/worker/worker_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ using std::string;
using std::unique_ptr;

WorkerThread::WorkerThread(uv_async_t *main_callback) :
Thread("worker thread", main_callback),
platform{WorkerPlatform::for_worker(this)}
Thread("worker thread", main_callback), platform{WorkerPlatform::for_worker(this)}
{
report_errable(*platform);
freeze();
Expand Down