page-cover
page-icon
설정
Node.js
sooros5132-avatarsooros51327/31/2022Node.js 설정

npm-check-updates - npm

Find newer versions of dependencies than what your package.json allows. Latest version: 17.1.1, last published: 14 days ago. Start using npm-check-updates in your project by running `npm i npm-check-updates`. There are 575 other projects in the npm registry using npm-check-updates.

npm-check-updates - npm-faviconhttps://www.npmjs.com/package/npm-check-updates

npm-check-updates패키지의 도움을 받아 패키지들의 latest버전으로 쉽게 업데이트할 수 있게 도와준다
bash
npm i -g npm-check-updates
bash
ncu --interactive
  • 스페이스바 - 선택
  • 엔터 - 선택한 패키지들 업데이트
  • 위, 아래쪽 방향키 - 커서 위치 옮기기
  • 왼쪽 방향키 - 선택 해제
  • 오른쪽 방향키 - 선택
  • ⌃(Ctrl) + C - 취소
  • Cyan = minor upgrade
  • Green = patch upgrade
ncu -i ncu --interactive
interactive모드. 목록을 보고 업데이트하고 싶은 패키지들을 스페이스바로 선택하고 엔터를 입력해서 설치할 수 있다. (추천 방식)
ncu
package.json 경로의 패키지들 업데이트 가능 버전을 확인
ncu [패키지명] ncu -f [패키지명] ncu —filter [패키지명]
해당 패키지만 확인
ncu react-* ncu "/^react-.*$/"
패턴을 써서 확인
ncu -u
업데이트 가능한 패키지들을 설치
ncu -g
업데이트 가능한 글로벌 패키지들을 확인

Numeral.js

A javascript library for formatting and manipulating numbers.

Numeral.js-faviconhttp://numeraljs.com/

숫자 포맷팅 할때 편하고 좋다.

date-fns - modern JavaScript date utility library

date-fns provides the most comprehensive yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.

date-fns - modern JavaScript date utility library-faviconhttps://date-fns.org/

날짜 포맷팅을 할 때
x일 전, x분 후 이런 포맷팅도 돼서 좋음.

browserslist 쾌속 가이드

언젠가부터 브라우저스리스트(browserslist)라는 것이 자주 눈에 띄더니 지금은 FE 개발 환경에서 뺄 수 없는 도구가 되었어요. 아마도 바벨(Babel)이라는 FE 계의 걸출한 스타 프로젝트에서 도입했기 때문일 거라고 생각합니다. 바벨을 사용하는 프로젝트들이 많다 보니 간접적으로 혹은 직접적으로 브라우저스리스트까지 사용하게 되는 것이죠. 사실 좋아요 좋은 도구라고 생각합니다. 아마 브라우저 환경을 정의하는 표준처럼 당분간 사용될 것 같아요. 보통 공식 사이트에서 자세히 알 수 있는 내용들은 글을 따로 안 쓰려고 하는 편인데…

browserslist 쾌속 가이드-faviconhttps://blog.shiren.dev/2020-12-01/

bash
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
bash
> npx browserslist@latest --update-db

Need to install the following packages:
  browserslist@4.21.3
Ok to proceed? (y) y
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
Latest version:     1.0.30001375
Installed version:  1.0.30001312
Removing old caniuse-lite from lock file
Installing new caniuse-lite version
$ npm install caniuse-lite
Cleaning package.json dependencies from caniuse-lite
$ npm uninstall caniuse-lite
caniuse-lite has been successfully updated

Target browser changes:
- and_chr 98
+ and_chr 104
- and_ff 96
+ and_ff 101
- android 98
+ android 104
- chrome 98
- chrome 97
- chrome 96
+ chrome 104
+ chrome 103
+ chrome 102
- edge 98
- edge 97
- edge 96
+ edge 104
+ edge 103
- firefox 97
- firefox 96
- firefox 95
+ firefox 103
+ firefox 102
- ios_saf 15.0-15.1
+ ios_saf 15.5
+ ios_saf 15.4
- opera 83
- opera 82
+ opera 89
+ opera 88
- safari 15.2-15.3
- safari 15.1
- safari 14.1
+ safari 15.6
+ safari 15.5
- samsung 15.0
+ samsung 17.0