Skip to content

Commit 41d1119

Browse files
authored
Merge branch 'master' into backspace
2 parents ca764ef + f31dcf2 commit 41d1119

File tree

4 files changed

+137
-38
lines changed

4 files changed

+137
-38
lines changed

.circleci/config.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
2+
version: 2.1
3+
orbs:
4+
commitlint: conventional-changelog/[email protected]
5+
6+
executors:
7+
default-executor:
8+
docker:
9+
- image: "cimg/node:lts"
10+
working_directory: ~/project
11+
resource_class: medium
12+
13+
commands:
14+
restore_test_cache:
15+
steps:
16+
- restore_cache:
17+
keys:
18+
- v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .Revision }}
19+
- v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}
20+
- v1-deps-
21+
save_test_cache:
22+
steps:
23+
- save_cache:
24+
key: v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .Revision }}
25+
paths:
26+
- node_modules
27+
- ~/.npm
28+
setup:
29+
steps:
30+
- run:
31+
name: Setup
32+
command: |
33+
npm prune
34+
test:
35+
steps:
36+
- run:
37+
name: Test
38+
command: |
39+
npm run test
40+
deploy:
41+
steps:
42+
- run:
43+
name: Deploy
44+
command: |
45+
npm run semantic-release
46+
47+
jobs:
48+
build-and-test:
49+
executor: default-executor
50+
steps:
51+
- checkout
52+
- restore_test_cache
53+
- setup
54+
- save_test_cache
55+
- test
56+
- persist_to_workspace:
57+
root: ~/project
58+
paths: .
59+
deploy:
60+
executor: default-executor
61+
steps:
62+
- attach_workspace:
63+
at: ~/project
64+
- deploy
65+
66+
workflows:
67+
commitlint:
68+
when:
69+
not:
70+
or:
71+
- equal: [ master, <<pipeline.git.branch>> ]
72+
- equal: [ develop, <<pipeline.git.branch>> ]
73+
- matches: { pattern: "^hotfix.*", value: <<pipeline.git.branch>> }
74+
- matches: { pattern: "^release.*", value: <<pipeline.git.branch>> }
75+
jobs:
76+
- commitlint/lint:
77+
target-branch: master
78+
79+
build-and-test-workflow:
80+
when:
81+
not:
82+
or:
83+
- equal: [ master, <<pipeline.git.branch>> ]
84+
- equal: [ develop, <<pipeline.git.branch>> ]
85+
- matches: { pattern: "^hotfix.*", value: <<pipeline.git.branch>> }
86+
- matches: { pattern: "^release.*", value: <<pipeline.git.branch>> }
87+
jobs:
88+
- build-and-test
89+
90+
deploy-workflow:
91+
when:
92+
or:
93+
- equal: [ master, <<pipeline.git.branch>> ]
94+
- equal: [ develop, <<pipeline.git.branch>> ]
95+
- matches: { pattern: "^hotfix.*", value: <<pipeline.git.branch>> }
96+
- matches: { pattern: "^release.*", value: <<pipeline.git.branch>> }
97+
- matches: { pattern: "^v[0-9]*.[0-9]*.[0-9]*$", value: <<pipeline.git.branch>> }
98+
99+
jobs:
100+
- build-and-test
101+
- deploy:
102+
context:
103+
- scratch-npm-creds
104+
requires:
105+
- build-and-test

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
# scratch-parser
22

3-
#### Parser for Scratch projects
3+
Parser for Scratch projects
44

5-
[![Build Status](https://travis-ci.org/LLK/scratch-parser.svg?branch=develop)](https://travis-ci.org/LLK/scratch-parser)
6-
[![dependencies Status](https://david-dm.org/llk/scratch-parser/status.svg)](https://david-dm.org/llk/scratch-parser)
7-
[![devDependencies Status](https://david-dm.org/llk/scratch-parser/dev-status.svg)](https://david-dm.org/llk/scratch-parser?type=dev)
5+
[![CircleCI](https://circleci.com/gh/LLK/scratch-parser.svg?style=shield)](https://app.circleci.com/pipelines/github/LLK/scratch-parser?branch=master)
86

97
## Overview
10-
The Scratch Parser is a [Node.js](https://nodejs.org) module that parses and validates [Scratch](https://scratch.mit.edu) projects.
8+
9+
The Scratch Parser is a [Node.js](https://nodejs.org) module that parses and validates
10+
[Scratch](https://scratch.mit.edu) projects.
1111

1212
## API
1313

14-
#### Installation
15-
```bash
14+
### Installation
15+
16+
```sh
1617
npm install scratch-parser
1718
```
1819

19-
#### Basic Use
20+
### Basic Use
21+
2022
```js
2123
var fs = require('fs');
2224
var parser = require('scratch-parser');
@@ -28,8 +30,10 @@ parser(buffer, function (err, project) {
2830
});
2931
```
3032

31-
#### "Info"
32-
In addition to the `_meta` data described above, Scratch projects include an attribute called `info` that *may* include the following:
33+
### "Info"
34+
35+
In addition to the `_meta` data described above, Scratch projects include an attribute called `info` that *may*
36+
include the following:
3337

3438
| Key | Description |
3539
| ----------------- | -------------------------------------------------------- |
@@ -40,30 +44,35 @@ In addition to the `_meta` data described above, Scratch projects include an att
4044

4145
## Testing
4246

43-
#### Running the Test Suite
44-
```bash
47+
### Running the Test Suite
48+
49+
```sh
4550
npm test
4651
```
4752

48-
#### Code Coverage Report
49-
```bash
53+
### Code Coverage Report
54+
55+
```sh
5056
make coverage
5157
```
5258

53-
#### Performance Benchmarks / Stress Testing
54-
```bash
59+
### Performance Benchmarks / Stress Testing
60+
61+
```sh
5562
make benchmark
5663
```
5764

5865
## Committing
66+
5967
This project uses [semantic release](https://github.com/semantic-release/semantic-release)
6068
to ensure version bumps follow semver so that projects using the config don't
6169
break unexpectedly.
6270

6371
In order to automatically determine the type of version bump necessary, semantic
6472
release expects commit messages to be formatted following
6573
[conventional-changelog](https://github.com/bcoe/conventional-changelog-standard/blob/master/convention.md).
66-
```
74+
75+
```text
6776
<type>(<scope>): <subject>
6877
<BLANK LINE>
6978
<body>
@@ -76,6 +85,7 @@ where you would include `BREAKING CHANGE` and `ISSUES FIXED` sections if
7685
applicable.
7786

7887
`type` is one of:
88+
7989
* `fix`: A bug fix **Causes a patch release (0.0.x)**
8090
* `feat`: A new feature **Causes a minor release (0.x.0)**
8191
* `docs`: Documentation only changes
@@ -90,14 +100,15 @@ applicable.
90100
Use the [commitizen CLI](https://github.com/commitizen/cz-cli) to make commits
91101
formatted in this way:
92102

93-
```bash
103+
```sh
94104
npm install -g commitizen
95105
npm install
96106
```
97107

98108
Now you're ready to make commits using `git cz`.
99109

100110
## Breaking changes
111+
101112
If you're committing a change that will require changes to existing code, ensure
102113
your commit specifies a breaking change. In your commit body, prefix the changes with "BREAKING CHANGE: "
103114
This will cause a major version bump so downstream projects must choose to upgrade

lib/sb3_schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
},
1818
"agent": {
1919
"type": "string"
20+
},
21+
"origin": {
22+
"type": "string"
2023
}
2124
},
2225
"required": [

0 commit comments

Comments
 (0)