Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit b447115

Browse files
authored
Merge pull request #237 from AtomLinter/arcanemagus/update-deps
Update dependencies and fix CI
2 parents 8235dbe + 99063e7 commit b447115

File tree

7 files changed

+272
-189
lines changed

7 files changed

+272
-189
lines changed

.circleci/config.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ defaults: &defaults
2222
name: Node.js version
2323
command: node --version
2424
- run:
25-
name: Install sass-lint
26-
command: sudo npm install -g sass-lint
25+
name: Install sass-lint globally
26+
command: |
27+
sudo npm install --global sass-lint && \
28+
sudo rm -Rf ~/.npm
29+
# Removes the .npm folder as the cache is partially polluted as root
2730
- run:
2831
name: Sass Lint version
2932
command: sass-lint --version
@@ -36,9 +39,6 @@ defaults: &defaults
3639
- run:
3740
name: APM version
3841
command: ${APM_SCRIPT_PATH} --version
39-
- run:
40-
name: Cleaning package
41-
command: ${APM_SCRIPT_PATH} clean
4242
- run:
4343
name: Package APM package dependencies
4444
command: |
@@ -50,14 +50,17 @@ defaults: &defaults
5050
- run:
5151
name: Package dependencies
5252
command: ${APM_SCRIPT_PATH} install
53+
- run:
54+
name: Cleaning package
55+
command: ${APM_SCRIPT_PATH} clean
5356
- run:
5457
name: Package specs
5558
command: ${ATOM_SCRIPT_PATH} --test spec
5659
# Cache node_modules
5760
- save_cache:
5861
paths:
5962
- node_modules
60-
key: v1-dependencies-{{ checksum "package.json" }}
63+
key: v2-dependencies-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json"}}
6164

6265
jobs:
6366
checkout_code:
@@ -69,10 +72,15 @@ jobs:
6972
# Restore node_modules from the last build
7073
- restore_cache:
7174
keys:
72-
# Get latest cache for this package.json
73-
- v1-dependencies-{{ checksum "package.json" }}
74-
# Fallback to the last available cache
75-
- v1-dependencies
75+
# Get latest cache for this package.json and pacakge-lock.json
76+
- v2-dependencies-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json"}}
77+
# Fallback to the current package.json
78+
- v2-dependencies-{{ .Branch }}-{{ checksum "package.json" }}-
79+
# Fallback to the last build for this branch
80+
- v2-dependencies-{{ .Branch }}-
81+
# Fallback to the last available master branch cache
82+
- v2-dependencies-master-
83+
# Don't go further down to prevent dependency issues from other branches
7684
# Save project state for next steps
7785
- persist_to_workspace:
7886
root: /tmp

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ os:
88

99
# Installed for linting the project
1010
language: node_js
11-
node_js: "6"
11+
node_js: "10"
1212

1313
install:
1414
- npm install -g sass-lint

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99

1010
install:
1111
# Install Node.js to run any configured linters
12-
- ps: Install-Product node 6
12+
- ps: Install-Product node 10
1313
- npm install -g sass-lint
1414

1515
### Generic setup follows ###

lib/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default {
115115
* @param {number} severity severity from the sass-lint linter
116116
* @return {string} severity for the Linter API
117117
*/
118-
getSeverity: severity => (severityMap.has(severity)
118+
getSeverity: (severity) => (severityMap.has(severity)
119119
? severityMap.get(severity)
120120
: 'info'
121121
),

lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default {
7171
},
7272

7373
deactivate() {
74-
idleCallbacks.forEach(callbackID => window.cancelIdleCallback(callbackID));
74+
idleCallbacks.forEach((callbackID) => window.cancelIdleCallback(callbackID));
7575
idleCallbacks.clear();
7676
return this.subs.dispose();
7777
},
@@ -96,7 +96,7 @@ export default {
9696
}
9797
if ((this.globalPath === '') && (prefixPath === null)) {
9898
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
99-
const env = Object.assign({}, consistentEnv());
99+
const env = { ...consistentEnv() };
100100
try {
101101
prefixPath = spawnSync(npmCommand, [
102102
'get',

0 commit comments

Comments
 (0)