Skip to content

Commit 585c2b8

Browse files
authored
Merge pull request #12 from gsmcmullin/gsmcmullin/maintenance
Maintenance
2 parents a98f2d5 + e9026be commit 585c2b8

22 files changed

+207
-205
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
decls
2+
spec

.eslintrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "steelbrain",
3+
"rules": {
4+
"no-param-reassign": "off",
5+
"no-duplicate-imports": "off",
6+
"import/prefer-default-export": "off"
7+
}
8+
}

.flowconfig

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
[ignore]
2-
node_modules/**/.*
32

43
[include]
54

65
[libs]
7-
interface
8-
node_modules/flow-atom-api/sig/v1.7.4
9-
node_modules/flow-atom-api/node_modules/flow-json/sig
10-
node_modules/flow-atom-api/node_modules/flow-json-schema/sig
11-
node_modules/flow-atom-api/node_modules/flow-atom-event-kit/sig/v1.5.0
12-
node_modules/flow-atom-api/node_modules/flow-atom-first-mate/sig/v5.1.1
13-
node_modules/flow-atom-api/node_modules/flow-atom-keymap/sig/v6.3.2
14-
node_modules/flow-atom-api/node_modules/flow-atom-node/sig
15-
node_modules/flow-atom-api/node_modules/flow-atom-oniguruma/sig/v6.1.0
16-
node_modules/flow-atom-api/node_modules/flow-atom-pathwatcher/sig/v6.2.4
17-
node_modules/flow-atom-api/node_modules/flow-atom-text-buffer/sig/v8.5.0
18-
node_modules/flow-atom-api/node_modules/flow-electron-api/sig/v1.1.1
19-
node_modules/flow-atom-api/node_modules/iflow-jquery/index.js.flow
6+
decls
7+
node_modules/@flow-atom/atom/sig/v1.8.0/
8+
node_modules/@flow-atom/keymap/sig/v6.3.2/
9+
node_modules/@flow-atom/electron/sig/v0.37.8/
10+
node_modules/@flow-atom/oniguruma/sig/v6.1.0/
11+
node_modules/@flow-atom/event-kit/sig/v2.0.0/
12+
node_modules/@flow-atom/pathwatcher/sig/v6.7.0/
13+
node_modules/@flow-atom/first-mate/sig/v5.1.1/
14+
node_modules/@flow-atom/text-buffer/sig/v9.2.2/
15+
node_modules/iflow-jquery/index.js.flow
2016

2117
[options]
18+
module.system=node

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
.DS_Store

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Philipp von Radziewsky
3+
Copyright (c) 2016 AtomDebugger Team (Philipp von Radziewsky & Steel Brain)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

circle.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
dependencies:
2+
override:
3+
- curl -L https://atom.io/download/deb -o atom-amd64.deb
4+
- sudo dpkg --install atom-amd64.deb || true
5+
- sudo apt-get update
6+
- sudo apt-get -f install
7+
- node --version
8+
- npm --version
9+
- atom --version
10+
- npm prune
11+
- npm install
12+
- apm rebuild
13+
- npm build
14+
15+
test:
16+
override:
17+
- npm test
18+
19+
machine:
20+
node:
21+
version: 6
File renamed without changes.

decls/jasmine.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* @flow */
2+
3+
declare function it(name: string, callback: (() => void)): void;
4+
declare function fit(name: string, callback: (() => void)): void;
5+
declare function expect(value: any): Object;
6+
declare function describe(name: string, callback: (() => void)): void;
7+
declare function fdescribe(name: string, callback: (() => void)): void;
8+
declare function beforeEach(callback: (() => void)): void;
9+
declare function afterEach(callback: (() => void)): void;

lib/breakpoint-event.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,22 @@
44

55
import Breakpoint from './breakpoint'
66

7-
export type BreakpointEventType = 'inserted' | 'removed' | 'enabled' |
8-
'disabled' | 'moved' |
9-
'condition-added' | 'condition-removed'
7+
export type BreakpointEventType = 'inserted' | 'removed' | 'enabled' |
8+
'disabled' | 'moved' |
9+
'condition-added' | 'condition-removed'
1010

1111
export default class BreakpointEvent {
12-
type: BreakpointEventType;
12+
type: BreakpointEventType;
1313
breakpoint: Breakpoint;
14-
bufferRow: ?number;
14+
bufferRow: ?number;
1515

16-
constructor(
17-
type: BreakpointEventType, breakpoint: Breakpoint, bufferRow?: number) {
18-
19-
this.type = type
16+
constructor(type: BreakpointEventType,
17+
breakpoint: Breakpoint,
18+
bufferRow?: number) {
19+
this.type = type
2020
this.breakpoint = breakpoint
2121

2222
if (type === 'moved') {
23-
2423
if (bufferRow == null || typeof bufferRow !== 'number') {
2524
throw new Error('bufferRow must be a number')
2625
}

lib/breakpoint.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@
33
/* @flow */
44

55
export type FunctionBreakpoint = { function: string }
6-
export type LineBreakpoint = { filePath: string, bufferRow: number }
6+
export type LineBreakpoint = { filePath: string, bufferRow: number }
77
export type BreakpointLocation = LineBreakpoint | FunctionBreakpoint
88

99
export default class Breakpoint {
10-
location: BreakpointLocation;
11-
enabled: boolean;
12-
condition: ?string;
10+
location: BreakpointLocation;
11+
enabled: boolean;
12+
condition: ?string;
1313
activeBufferRow: ?number;
1414

1515
constructor(location: BreakpointLocation, condition?: string) {
16-
1716
if (!location.function && (!location.filePath || !location.bufferRow)) {
1817
throw new TypeError('location must be BreakpointLocation')
1918
}
2019

21-
this.location = location
22-
this.condition = (condition) ? condition : null
23-
this.enabled = true
20+
this.location = location
21+
this.condition = condition || null
22+
this.enabled = true
2423
this.activeBufferRow = null
2524
}
2625

@@ -33,14 +32,12 @@ export default class Breakpoint {
3332
}
3433

3534
equals(other: Breakpoint): bool {
36-
3735
if (this.location.function && other.location.function) {
38-
3936
return (this.location.function === other.location.function)
4037
} else if (this.location.filePath && other.location.filePath) {
41-
const same_file = (this.location.filePath === other.location.filePath)
38+
const sameFile = (this.location.filePath === other.location.filePath)
4239

43-
if (same_file && this.location.bufferRow && other.location.bufferRow) {
40+
if (sameFile && this.location.bufferRow && other.location.bufferRow) {
4441
return (this.location.bufferRow === other.location.bufferRow)
4542
}
4643
}
@@ -49,9 +46,8 @@ export default class Breakpoint {
4946
}
5047

5148
toHumanized(): string {
52-
5349
if (this.location.filePath && this.location.bufferRow) {
54-
return this.location.filePath + ':' + (this.location.bufferRow+1)
50+
return `${this.location.filePath}:${this.location.bufferRow + 1}`
5551
}
5652

5753
return '?'

0 commit comments

Comments
 (0)