Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add untranspiled build and typescript support #177

Merged
merged 21 commits into from May 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
@@ -1,3 +1,3 @@
{
"presets": ["env"]
"presets": [["@babel/preset-env", { "targets": { "node": "current" } }]]
}
38 changes: 11 additions & 27 deletions .circleci/config.yml
@@ -1,49 +1,34 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
version: 2.1

defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:10.1
orbs:
node: circleci/node@4.1.0

jobs:
build:
<<: *defaults
executor: node/default
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run:
name: Install dependencies
command: yarn
- node/install-packages:
pkg-manager: yarn
- run:
name: Lint code
command: yarn lint
- run:
name: Test code
command: yarn test
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- persist_to_workspace:
root: ~/repo
paths: .

deploy:
<<: *defaults
executor: node/default
steps:
- attach_workspace:
at: ~/repo
- add_ssh_keys:
fingerprints:
- "16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48"
- "9f:10:3c:f2:df:f4:93:d8:e7:b0:14:0e:42:74:8f:66"
- '16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48'
- '9f:10:3c:f2:df:f4:93:d8:e7:b0:14:0e:42:74:8f:66'
- run:
name: Authenticate NPM registry
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
Expand All @@ -60,8 +45,7 @@ jobs:
command: scripts/deploy-docs.sh

workflows:
version: 2
build-and-deploy:
build:
jobs:
- build:
filters:
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
@@ -0,0 +1 @@
dist/
17 changes: 13 additions & 4 deletions .eslintrc.json
@@ -1,9 +1,18 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"env": {
"browser": true,
"es6": true,
"node": true
"node": true,
"browser": true
},
"extends": ["plugin:prettier/recommended"],
"parser": "babel-eslint"
"plugins": ["jest"],
"extends": ["eslint:recommended", "plugin:jest/recommended", "prettier"],
"rules": {
"jest/no-try-expect": "off",
"jest/no-conditional-expect": "off"
}
}
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,5 +1,5 @@
node_modules/
*.log
dist/
package-lock.json
docs/.vuepress/dist
.eslintcache
7 changes: 7 additions & 0 deletions .prettierrc
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"printWidth": 80
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- Untranspiled build `v8n.esm.browser.js` for modern browsers ([#165](https://github.com/imbrn/v8n/issues/165))
- TypeScript support through bundled type definitions ([#28](https://github.com/imbrn/v8n/issues/28))

### Fixed

- Bug with schema validation ([#166](https://github.com/imbrn/v8n/pull/166))
Expand Down