Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"presets": [ "./tools/babel-preset" ]
"presets": ["@babel/preset-env"],
"plugins": [
"@babel/plugin-syntax-import-assertions",
"@babel/plugin-transform-runtime"
]
}
46 changes: 24 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
version: 2.1

working_directory: ~/repo
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
# See: https://circleci.com/docs/2.0/orb-intro/
orbs:
node: circleci/node@5.2.0

jobs:
build-test-package:
docker:
- image: cimg/node:22.15.1
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: npm i

Expand All @@ -33,13 +27,21 @@ jobs:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- run: ./node_modules/.bin/greenkeeper-lockfile-update
- run: npm run build

# run tests!
- run: npm run test
- run: npm run test:ci

# send code coverage info to coveralls
- run: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

- run: ./node_modules/.bin/greenkeeper-lockfile-upload
# send code coverage info to codecov
- run: bash <(curl -s https://codecov.io/bash)

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
test-package: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- build-test-package
36 changes: 36 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"plugins": ["prettier"],
"extends": [
"plugin:prettier/recommended"
],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.js"],
"rules": {
"semi": ["error", "never"],
"no-prototype-builtins": "off",
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
}
}
],
"parserOptions": {
"babelOptions": {
"plugins": [
"@babel/plugin-syntax-import-assertions"
]
},
"ecmaVersion": "latest",
"sourceType": "module"
}
}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ node_modules

# Build / Test files
coverage
es
umd
dist
/*.js

# Include Rollup config
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"semi": false
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma"
},
"nxConsole.generateAiAgentRules": true
}
Loading