Skip to content

Commit

Permalink
chore: migrate to yarn 2
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Apr 1, 2020
1 parent 7b8fa16 commit f418be0
Show file tree
Hide file tree
Showing 147 changed files with 47,087 additions and 7,282 deletions.
34 changes: 19 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,24 @@ jobs:
- checkout
- restore_cache:
keys:
- deps-{{ checksum "yarn.lock" }}
- install-dep-cache-{{ checksum "yarn.lock" }}-{{ checksum ".yarn/releases/yarn-sources.js" }}
- restore_cache:
keys:
- v-8.0.0-electron
- v-8.2.0-electron
- run:
command: yarn --frozen-lockfile
command: YARN_CHECKSUM_BEHAVIOR=ignore node .yarn/releases/yarn-sources.js install
- run:
command: yarn pretest
command: node .yarn/releases/yarn-sources.js pretest
- run:
command: cp .pnp.js .yarn/.pnp.js
- save_cache:
key: deps-{{ checksum "yarn.lock" }}
key: install-dep-cache-{{ checksum "yarn.lock" }}-{{ checksum ".yarn/releases/yarn-sources.js" }}
paths:
- node_modules
- .yarn
- run:
command: node ./test/out/helpers/downloadElectron.js
command: node .yarn/releases/yarn-sources.js node ./test/out/helpers/downloadElectron.js
- save_cache:
key: v-8.0.0-electron
key: v-8.2.0-electron
paths:
- ~/.cache/electron

Expand All @@ -32,29 +34,31 @@ jobs:
docker:
- image: electronuserland/builder:wine-mono
environment:
JEST_JUNIT_OUTPUT: ./test-reports/test.xml
JEST_JUNIT_OUTPUT_DIR: /tmp/test-reports/test.xml
TZ: Europe/Berlin
steps:
- checkout
- restore_cache:
keys:
- deps-{{ checksum "yarn.lock" }}
- install-dep-cache-{{ checksum "yarn.lock" }}-{{ checksum ".yarn/releases/yarn-sources.js" }}
- restore_cache:
keys:
- v-8.0.0-electron
- v-8.2.0-electron
# because in the build job we use circleci docker image and circleci restores cache to original user home
- run:
command: |
mv /home/circleci/project/node_modules node_modules
rm -rf .yarn
mv /home/circleci/project/.yarn .yarn
mv .yarn/.pnp.js .pnp.js
mkdir -p ~/.cache
mv /home/circleci/.cache/electron ~/.cache/electron
- run:
# do not use yarn test because lint is done in the build job
command: |
yarn compile
node ./test/out/helpers/runTests.js
node .yarn/releases/yarn-sources.js compile
node .yarn/releases/yarn-sources.js node ./test/out/helpers/runTests.js
- store_test_results:
path: test-reports
path: /tmp/test-reports

workflows:
version: 2
Expand Down
18 changes: 11 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# .editorconfig for electron-builder
#
# More info inside CONTRIBUTING.md

# For all files in this project:
# - 2-space soft tabs
# - Trim trailing whitespace
[*]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
ij_javascript_use_double_quotes = true
ij_typescript_use_double_quotes = true
charset = utf-8

ij_any_else_on_new_line = true
ij_any_block_comment_at_first_column = false
ij_any_line_comment_at_first_column = false
ij_javascript_force_semicolon_style = true
ij_javascript_use_semicolon_after_statement = false
ij_typescript_force_semicolon_style = true
ij_typescript_use_semicolon_after_statement = false
28 changes: 28 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
semi: "off",
"@typescript-eslint/member-delimiter-style": ["error", {
multiline: {
delimiter: "none",
},
}],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",
"no-constant-condition": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/explicit-function-return-type": ["off", {
// "allowExpressions": false,
}]
}
}
13 changes: 8 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@

.DS_Store

/packages/*/out/
/out/
# to not exclude .js.snap (jest snapshots)
/test/out/**/*.js
/test/out/**/*.map
out/
/test/test-report.xml

/packages/dmg-builder/vendor/
/packages/electron-builder/README.md
#/packages/app-builder-lib/scheme.json

Expand All @@ -30,3 +27,9 @@ electron-builder-*.d.ts
/docs/

__publish.sh

/.yarn/cache
/.yarn/unplugged
/.yarn/build-state.yml
/.yarn/install-state.gz
/.pnp.*
1 change: 1 addition & 0 deletions .idea/dictionaries/develar.xml

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

1 change: 1 addition & 0 deletions .idea/electron-builder.iml

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

10 changes: 0 additions & 10 deletions .idea/typescript-compiler.xml

This file was deleted.

6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ matrix:
cache:
yarn: true
directories:
- node_modules
- .yarn
- $HOME/Library/Caches/electron
- $HOME/Library/Caches/electron-builder
- /tmp/jest-electron-builder-tests

install:
- yarn --frozen-lockfile
- node .yarn/releases/yarn-sources.js

script:
- yarn test
- node .yarn/releases/yarn-sources.js test

branches:
except:
Expand Down

0 comments on commit f418be0

Please sign in to comment.