Skip to content

Commit

Permalink
feat: lock library dependencies (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelkaporin authored Jul 26, 2023
1 parent a400f0a commit 34ccb2a
Show file tree
Hide file tree
Showing 6 changed files with 14,393 additions and 9 deletions.
23 changes: 18 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,34 @@ jobs:
parameters:
node_version:
type: string
package-lock:
type: string
working_directory: ~/code-sdk
docker:
- image: cimg/node:<< parameters.node_version >>
steps:
- checkout
- restore_cache:
keys:
- v2-{{ .Branch }}-{{ .Revision }}-<< parameters.node_version >>
- run:
name: Install
command: npm install
- v2-{{ .Branch }}-{{ .Revision }}-<< parameters.node_version >>>-<< parameters.package-lock >>>
- when:
condition: << parameters.package-lock >> == "locked-dependencies"
steps:
- run:
name: Install
command: npm install
- unless:
condition: << parameters.package-lock >>
steps:
- run:
name: Install without locked dependencies
command: npm install --no-package-lock
- save_cache:
key: v2-{{ .Branch }}-{{ .Revision }}-<< parameters.node_version >>
key: v2-{{ .Branch }}-{{ .Revision }}-<< parameters.node_version >>-<< parameters.package-lock >>>
paths:
- node_modules
- run: npm run test

lint:
parameters:
node_version:
Expand Down Expand Up @@ -76,6 +88,7 @@ workflows:
matrix:
parameters:
node_version: ['10.24.0', '12.22.7']
package-lock: ['locked-dependencies', 'no-package-lock']
context: nodejs-install
requires:
- lint
Expand Down
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ coverage
**/.dccache
.idea
tsc.iml
package-lock.json
tsconfig.tsbuildinfo
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ dist
.idea
coverage
tsc.iml
package-lock.json
tsconfig.tsbuildinfo
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ coverage
**/.dccache
.idea
tsc.iml
package-lock.json
tsconfig.tsbuildinfo
Loading

0 comments on commit 34ccb2a

Please sign in to comment.