Skip to content

Commit

Permalink
refactor: switch to yarn 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Feb 26, 2021
1 parent d5ca8b5 commit 3a0e2de
Show file tree
Hide file tree
Showing 14 changed files with 13,212 additions and 15,025 deletions.
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ updates:
schedule:
interval: 'weekly'
# Maintain dependencies for npm
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
# - package-ecosystem: 'npm'
# directory: '/'
# schedule:
# interval: 'weekly'
25 changes: 16 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,24 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: '12.x'
- uses: actions/cache@v2
node-version: '14.x'
- run: npm i -g yarn
- run: yarn set version berry
- run: cat .yarnrc_patch.yml >> .yarnrc.yml
- run: yarn config set checksumBehavior ignore
- name: Cache Node.js modules
uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ./.yarn
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm test:coverage
${{ runner.os }}-yarn2-
- run: yarn install
- run: yarn clean
- run: yarn compile
- run: yarn build
- run: yarn lint
- run: yarn test:coverage
- run: yarn docs
# - name: Deploy
# if: github.ref == 'refs/heads/master' && github.event_name == 'push'
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ node_modules/
*.map
*.css
*.log
/.cache-loader
*.tsbuildinfo
/.yarn
/.pnp.js
4 changes: 2 additions & 2 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"hooks": {
"before:init": "npm test",
"before:release": "npm run dist",
"before:init": "yarn run lint && yarn test",
"before:release": "yarn compile && yarn run build && yarn run dist && yarn run postdist",
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
},
"git": {
Expand Down
7 changes: 6 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"arcanis.vscode-zipfs",
"stylelint.vscode-stylelint"
]
}
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
}
},
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"stylelint.stylelintPath": ".yarn/sdks/stylelint/lib/index.js"
}
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarnPath: .yarn/releases/yarn-2.4.0.cjs
6 changes: 5 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

module.exports = {
preset: 'ts-jest',
testRegex: 'tests/.*\\.spec\\.(ts|tsx|js)$',
testRegex: '/tests/.*\\.spec\\.(ts|tsx|js)$',
haste: {
throwOnModuleCollision: false,
},
modulePathIgnorePatterns: ['node_modules/terser', 'node_modules/jest-runner'],
globals: {
'ts-jest': {
tsConfig: 'tsconfig.test.json',
Expand Down
Loading

0 comments on commit 3a0e2de

Please sign in to comment.