Skip to content

Commit

Permalink
10.0.0-ds
Browse files Browse the repository at this point in the history
  • Loading branch information
Iordanis Kostelidis committed Jan 16, 2020
1 parent 5aff704 commit 4589e70
Show file tree
Hide file tree
Showing 64 changed files with 6,586 additions and 5,302 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
*_flymake.*
/node_modules
/localConfig.js

.idea
salve-ds-*.tar.gz
17 changes: 2 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
dist: trusty
language: node_js
node_js:
- '12'
- '10'
- '8'
env:
global:
# For Greenkeeper.
secure: gBIzQfN+ExBh+OXLEbDqqdQQZqhks6tdOTzYgW/UcH+NBxNR4eGLVKxJMGaZ5wB02awY1uTsZkweXIIAeHZ8y4JVQ+5Kcf6BSkkmYCNs9WGGun7d2IvhG2Oeez6hGdqzFKBGmWTpg/8oa2ZKBB+AEbjDxIYOX3MMf4t7WGJjPVc=
before_install:
# We want a dump of the travis variables for debugging purposes.
- env | grep TRAVIS_
- sudo apt-get update -qq
- sudo apt-get install -y xsltproc jing libsaxonhe-java
# We need at least npm 6
- '[[ $(npm -v) =~ ^[6-9].*$ ]] || npm install -g npm@latest'
- npm install -g greenkeeper-lockfile@2
# We need this to work around this:
# https://github.com/greenkeeperio/greenkeeper-lockfile/issues/156
install: 'if [[ ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} = greenkeeper/* ]]; then npm install; else npm ci; fi'
- sudo apt-get install -y xsltproc jing
script: gulp test
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
branches:
except:
- master
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
<a name="10.0.0-ds"></a>
## 10.0.0-ds (2020-01-16)


### Changes

* Customization for our Wed Version


<a name="9.1.2"></a>
## [9.1.2](https://github.com/mangalam-research/salve/compare/v9.1.1...v9.1.2) (2019-04-23)


### Bug Fixes

* bad typing on fixPrototype ([a94c3d8](https://github.com/mangalam-research/salve/commit/a94c3d8))
* handling of notAllowed as element content ([8242b1e](https://github.com/mangalam-research/salve/commit/8242b1e))
* the content type check (section 7.2) ([4f10c76](https://github.com/mangalam-research/salve/commit/4f10c76))



<a name="9.1.1"></a>
## [9.1.1](https://github.com/mangalam-research/salve/compare/v9.1.0...v9.1.1) (2019-02-18)

Expand Down
10 changes: 0 additions & 10 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
memory usage, help editors be more user friendly and possibly be
faster generally.

* Document why mixins are used in validate.js instead of a class hierarchy.

Context Independence
==================

Expand Down Expand Up @@ -81,14 +79,6 @@ I call the pattern above fake variance because it is equivalent to:
The choice is not really between two differently structured "person"
elements but between two contents for "person".



* Support for events that are more appropriate in a DOM
environment. For instance, have a whole start tag be treated as a
single event, with attributes and all, rather than a series of
"enterStartTag", "attributeName", "attributeValue", "leaveStartTag"
events.

* Dump xml_path as variable.
* Add a Start class to validate deriving from Pattern which will
hold the start pattern. (Instead of the current system in which
Expand Down
2 changes: 1 addition & 1 deletion lib/salve/conversion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"use strict";

export { ConversionResult, convertRNGToPattern } from "./conversion/convert";
export { Element, Node, parseSimplifiedSchema,
export { Element, parseSimplifiedSchema,
Text } from "./conversion/parser";
export { makeResourceLoader, Resource,
ResourceLoader } from "./conversion/resource-loader";
Expand Down
15 changes: 7 additions & 8 deletions lib/salve/conversion/convert-simplified.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function walk(el: Element): (Pattern | ElementPattern | Grammar) {
case "grammar":
return new Grammar(el.path, walk(el.children[0] as Element) as Pattern,
el.children.slice(1)
.map((x) => walk(x as Element)) as Define[]);
.map(x => walk(x as Element)) as Define[]);
case "except":
case "start":
return walk(el.children[0] as Element);
Expand All @@ -43,8 +43,8 @@ function walk(el: Element): (Pattern | ElementPattern | Grammar) {
(length !== 0 && last.local === "except") ? last : undefined;
const params =
((except === undefined ? children : children.slice(0, -1)) as Element[])
.map((param) => ({ name: param.mustGetAttribute("name"),
value: param.children[0].text }));
.map(param => ({ name: param.mustGetAttribute("name"),
value: param.children[0].text }));

return new Data(el.path, el.mustGetAttribute("type"),
el.mustGetAttribute("datatypeLibrary"),
Expand Down Expand Up @@ -90,18 +90,17 @@ function walk(el: Element): (Pattern | ElementPattern | Grammar) {
function walkNameClass(el: Element): ConcreteName {
switch (el.local) {
case "choice":
return new NameChoice(el.path,
walkNameClass(el.children[0] as Element),
return new NameChoice(walkNameClass(el.children[0] as Element),
walkNameClass(el.children[1] as Element));
case "name":
return new Name(el.path, el.mustGetAttribute("ns"), el.text);
return new Name(el.mustGetAttribute("ns"), el.text);
case "nsName":
return new NsName(el.path, el.mustGetAttribute("ns"),
return new NsName(el.mustGetAttribute("ns"),
el.children.length !== 0 ?
walkNameClass(el.children[0] as Element) :
undefined);
case "anyName":
return new AnyName(el.path, el.children.length !== 0 ?
return new AnyName(el.children.length !== 0 ?
walkNameClass(el.children[0] as Element) :
undefined);
case "except":
Expand Down
2 changes: 1 addition & 1 deletion lib/salve/conversion/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Promise<ConversionResult> {
timing: false,
keepTemp: false,
simplifyTo: Infinity,
resourceLoader: resourceLoader,
resourceLoader,
validate: true,
createManifest: options.createManifest,
manifestHashAlgorithm: options.manifestHashAlgorithm,
Expand Down
Loading

0 comments on commit 4589e70

Please sign in to comment.