data-restructor 3.3.4 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.auto-changelog +9 -0
- package/.auto-changelog-template.hbs +36 -0
- package/.github/workflows/codeql-analysis.yml +4 -4
- package/.github/workflows/continuous-integration.yaml +84 -0
- package/CHANGELOG.md +199 -94
- package/CONTRIBUTING.md +51 -43
- package/Commands.md +16 -15
- package/README.md +193 -137
- package/SECURITY.md +2 -2
- package/coverage/coverage-summary.json +3 -3
- package/coverage/datarestructor.js.html +133 -133
- package/coverage/describedfield.js.html +45 -45
- package/coverage/index.html +1 -1
- package/coverage/templateResolver.js.html +26 -26
- package/devdist/datarestructor-ie.js +1487 -1678
- package/devdist/datarestructor.js +1438 -1614
- package/devdist/describedfield-ie.js +260 -282
- package/devdist/describedfield.js +257 -279
- package/devdist/templateResolver-ie.js +221 -257
- package/devdist/templateResolver.js +192 -228
- package/dist/datarestructor-ie.js +1 -1
- package/dist/datarestructor-ie.js.map +1 -1
- package/dist/datarestructor.js +1 -1
- package/dist/datarestructor.js.map +1 -1
- package/dist/describedfield-ie.js +1 -1
- package/dist/describedfield-ie.js.map +1 -1
- package/dist/describedfield.js +1 -1
- package/dist/describedfield.js.map +1 -1
- package/dist/templateResolver-ie.js +1 -1
- package/dist/templateResolver-ie.js.map +1 -1
- package/dist/templateResolver.js +1 -1
- package/dist/templateResolver.js.map +1 -1
- package/docs/datarestructor.js.html +1 -1
- package/docs/describedfield.js.html +1 -1
- package/docs/index.html +54 -44
- package/docs/module-datarestructor.DescribedEntryCreator.html +94 -94
- package/docs/module-datarestructor.PropertyStructureDescriptionBuilder.html +1 -1
- package/docs/module-datarestructor.Restructor.html +1 -1
- package/docs/module-datarestructor.Transform.html +605 -605
- package/docs/module-datarestructor.html +959 -995
- package/docs/module-described_field.DescribedDataFieldBuilder.html +1 -1
- package/docs/module-described_field.DescribedDataFieldGroup.html +1 -1
- package/docs/module-described_field.html +1 -37
- package/docs/module-template_resolver.Resolver.html +167 -167
- package/docs/module-template_resolver.html +1 -37
- package/docs/templateResolver.js.html +1 -1
- package/package.json +20 -14
- package/renovate.json +14 -0
- package/.github/workflows/action.yaml +0 -44
package/CONTRIBUTING.md
CHANGED
|
@@ -4,20 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
The following is a set of guidelines for contributing to the search menu UI. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Table Of Contents
|
|
8
8
|
|
|
9
9
|
[Code of Conduct](#code-of-conduct)
|
|
10
10
|
|
|
11
11
|
[What should I know before I get started?](#what-should-i-know-before-i-get-started)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
|
|
13
|
+
- [Prerequisites](#prerequisites)
|
|
14
|
+
- [First Steps](#first-steps)
|
|
15
|
+
- [Tests](#tests)
|
|
15
16
|
|
|
16
17
|
[How Can I Contribute?](#how-can-i-contribute)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
|
|
19
|
+
- [Reporting Bugs](#reporting-bugs)
|
|
20
|
+
- [Suggesting Enhancements](#suggesting-enhancements)
|
|
21
|
+
- [Your First Code Contribution](#your-first-code-contribution)
|
|
22
|
+
- [Pull Requests](#pull-requests)
|
|
21
23
|
|
|
22
24
|
## Code of Conduct
|
|
23
25
|
|
|
@@ -26,16 +28,22 @@ This project and everyone participating in it is governed by the [Code of Conduc
|
|
|
26
28
|
## What should I know before I get started?
|
|
27
29
|
|
|
28
30
|
### Prerequisites
|
|
31
|
+
|
|
29
32
|
- Install [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
|
|
30
|
-
- Install [merger.js](https://github.com/joao-neves95/merger-js/blob/master/README.md) using `npm install merger-js -g`
|
|
31
33
|
|
|
32
34
|
### First steps
|
|
33
35
|
|
|
34
|
-
- [Fork](https://docs.github.com/en/github/getting-started-with-github/quickstart/fork-a-repo) this repository
|
|
36
|
+
- [Fork](https://docs.github.com/en/github/getting-started-with-github/quickstart/fork-a-repo) this repository
|
|
35
37
|
- Setup and build the project locally as described in [README.md](README.md#build-all)
|
|
36
38
|
- A list of all commands can be found in [COMMANDS.md](COMMANDS.md)
|
|
37
39
|
|
|
40
|
+
### GIT commit
|
|
41
|
+
|
|
42
|
+
- Create a feature branch before making a commit.
|
|
43
|
+
- Automatically generated build artifacts (`dist`, - `devdist`, `docs`, `coverage` folder contents) shouldn't be included in a commit. The continuous integration pipeline will generate them and commit them separately. This also means that a feature branch needs to be pulled after the pipeline has finished before adding further commits. When the pull request is ready to merge a rebase may be considered to clean up the history and get the feature branch up to date if needed. The same applies here: Build artifacts should be left out since the pipeline will take care of them.
|
|
44
|
+
|
|
38
45
|
### Tests
|
|
46
|
+
|
|
39
47
|
- All unit tests are integrated into the build
|
|
40
48
|
- For immediate feedback open [test/js/SpecRunner.html](test/js/SpecRunner.html) to run JavaScript [Jasmine](https://jasmine.github.io) Unit-Tests in the browser.
|
|
41
49
|
- To assure high automation this project enforces 90% branch coverage within the build, so please provide tests for every change.
|
|
@@ -52,7 +60,7 @@ Before creating bug reports, please check [this list](#before-submitting-a-bug-r
|
|
|
52
60
|
|
|
53
61
|
#### Before Submitting A Bug Report
|
|
54
62
|
|
|
55
|
-
|
|
63
|
+
- **Perform a [search](https://github.com/JohT/data-restructor-js/issues)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one.
|
|
56
64
|
|
|
57
65
|
#### How Do I Submit A (Good) Bug Report?
|
|
58
66
|
|
|
@@ -60,26 +68,26 @@ Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/).
|
|
|
60
68
|
|
|
61
69
|
Explain the problem and include additional details to help maintainers reproduce the problem:
|
|
62
70
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
- **Use a clear and descriptive title** for the issue to identify the problem.
|
|
72
|
+
- **Describe the exact steps which reproduce the problem** in as many details as possible.
|
|
73
|
+
- **If possible, provide a "reproducer"** e.g. in an public example repository containing the easy debugable code to reproduce the problem. It can also be a simple HTML and JS attached as files.
|
|
74
|
+
- **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
|
|
75
|
+
- **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
|
|
76
|
+
- **Explain which behavior you expected to see instead and why.**
|
|
69
77
|
|
|
70
|
-
|
|
78
|
+
- **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
|
|
71
79
|
|
|
72
80
|
Provide more context by answering these questions:
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
- **Did the problem start happening recently** (e.g. after updating to a new version) or was this always a problem?
|
|
83
|
+
- If the problem started happening recently, **can you reproduce the problem in an older version?** What's the most recent version in which the problem doesn't happen?
|
|
84
|
+
- **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
|
|
85
|
+
- If the problem is related to working with files (e.g. opening and editing files), **does the problem happen for all files and projects or only some?** Does the problem happen only when working with local or remote files (e.g. on network drives), with files of a specific type (e.g. only JavaScript or Python files), with large files or files with very long lines, or with files in a specific encoding? Is there anything else special about the files you are using?
|
|
78
86
|
|
|
79
87
|
Include details about your configuration and environment:
|
|
80
88
|
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
- **Which version of the search menu UI are you using?**
|
|
90
|
+
- **What's the name and version of the OS and browser you're using**
|
|
83
91
|
|
|
84
92
|
### Suggesting Enhancements
|
|
85
93
|
|
|
@@ -89,20 +97,20 @@ Before creating enhancement suggestions, please check [this list](#before-submit
|
|
|
89
97
|
|
|
90
98
|
#### Before Submitting An Enhancement Suggestion
|
|
91
99
|
|
|
92
|
-
|
|
100
|
+
- **Perform a [search](https://github.com/JohT/data-restructor-js/issues)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
|
93
101
|
|
|
94
102
|
#### How Do I Submit A (Good) Enhancement Suggestion?
|
|
95
103
|
|
|
96
104
|
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue on that repository and provide the following information:
|
|
97
105
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
- **Use a clear and descriptive title** for the issue to identify the suggestion.
|
|
107
|
+
- **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
|
|
108
|
+
- **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
|
|
109
|
+
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
|
|
110
|
+
- **Explain why this enhancement would be useful** to most search menu UI users.
|
|
111
|
+
- **List some other libraries where this enhancement exists.**
|
|
112
|
+
- **Specify which version you're using.**
|
|
113
|
+
- **Specify the name and version of the OS and browser you're using.**
|
|
106
114
|
|
|
107
115
|
### Your First Code Contribution
|
|
108
116
|
|
|
@@ -132,16 +140,16 @@ The easiest approach is to write code that matches the style of existing one. If
|
|
|
132
140
|
|
|
133
141
|
### Git Commit Messages
|
|
134
142
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
143
|
+
- Use the present tense ("Add feature" not "Added feature")
|
|
144
|
+
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
|
|
145
|
+
- Limit the first line to 72 characters or less
|
|
146
|
+
- Include a reference to the pull request
|
|
147
|
+
- Reference related issues and pull requests as well as further details liberally after the first line
|
|
140
148
|
|
|
141
149
|
### JavaScript
|
|
142
150
|
|
|
143
|
-
|
|
144
|
-
changes with internet explorer developer mode in IE5 mode. Include polyfills or ponyfills
|
|
145
|
-
if necessary. These are included in modules packages especially for ie.
|
|
146
|
-
Including as many browsers as possible is a key feature, that might change someday,
|
|
147
|
-
but only for a good reason.
|
|
151
|
+
- Compatibility with old browser like IE5 is important for now. Please test your
|
|
152
|
+
changes with internet explorer developer mode in IE5 mode. Include polyfills or ponyfills
|
|
153
|
+
if necessary. These are included in modules packages especially for ie.
|
|
154
|
+
Including as many browsers as possible is a key feature, that might change someday,
|
|
155
|
+
but only for a good reason.
|
package/Commands.md
CHANGED
|
@@ -2,20 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Overview of the commands to test, run and build this project as well as those that were used to setup it.
|
|
4
4
|
|
|
5
|
-
## Most important commands for development
|
|
5
|
+
## Most important commands for development
|
|
6
|
+
|
|
6
7
|
- `npm install` Installs all dependencies and creates the folder `node_modules`, that is needed for all following commands.
|
|
7
8
|
- `npm run package` Ready to publish build incl. test, coverage, doc generation, dev+prod build
|
|
9
|
+
- `npm run changelog` Update CHANGELOG.md
|
|
8
10
|
- `npm login` + `npm publish` To publish a new release. Be sure to run npm run package first.
|
|
9
11
|
|
|
12
|
+
## Commands to test, run and build the project
|
|
10
13
|
|
|
11
|
-
## Commands that needs to be installed globally to build the project
|
|
12
|
-
- `npm install merger-js -g` Cross-platform CLI build tool to bundle JavaScript files without modules
|
|
13
|
-
|
|
14
|
-
**Notice:** merger needs manual input in the console and prompts to select the source.
|
|
15
|
-
Select "all" using the arrow down key followed by enter to continue the build. If there is a better solution for that, propose it by creating an issue. `merger.js` is helpful to create additional JavaScript bundles without module system.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## Commands to test, run and build the project:
|
|
19
14
|
- `npm run coverage` Run all unit tests (using jasmine) **with** reporting coverage (using nyc/istanbul)
|
|
20
15
|
- `npm test` Only all unit tests (using jasmine) **without** coverage report
|
|
21
16
|
- `npm run coverage-badge` Updates code coverage badge inside `README.md`
|
|
@@ -23,8 +18,12 @@ Select "all" using the arrow down key followed by enter to continue the build. I
|
|
|
23
18
|
- `npm run build` Builds the application for production including minification,...
|
|
24
19
|
- `npm run dev` Builds the application for development (without minification) and starts the live server
|
|
25
20
|
- `npm run watch` Builds the application for development (without minification) without starting the server.
|
|
21
|
+
- `npm run merger` Merges JavaScript source files javascript file bundles that can be used with/without module system and can therefore be used directly within the browser (without node.js e.g.).
|
|
22
|
+
The command itself needs to send the letter "k" and the enter key to the merger command to automate
|
|
23
|
+
the key prompt that would otherwise block continuous integration.
|
|
24
|
+
|
|
25
|
+
## Commands used to setup the project
|
|
26
26
|
|
|
27
|
-
## Commands used to setup the project:
|
|
28
27
|
- `npm init` Initialize node package manager, creates `package.json` file.
|
|
29
28
|
- `npm install jasmine --save-dev` Adds jasmine unit test framework as development dependency.
|
|
30
29
|
- `npx jasmine init` Initializes jasmine, creates `spec/support/jasmine.json` file.
|
|
@@ -34,14 +33,16 @@ Select "all" using the arrow down key followed by enter to continue the build. I
|
|
|
34
33
|
- `npm install eslint --save-dev` Setup linter (static code quality analyzer)
|
|
35
34
|
- `npx eslint --init` Initialize linter configuration file
|
|
36
35
|
- `npm install istanbul-badges-readme --save-dev` Setup for code coverage badge for README.MD.
|
|
36
|
+
- `npm install --save-exact --save-dev node-notifier inquirer merger-js` Setup file merger for vanilla JS distributions.
|
|
37
37
|
- `npm audit fix` Fixes vulnerabilities
|
|
38
38
|
|
|
39
|
+
## Further steps
|
|
39
40
|
|
|
40
|
-
## Further steps:
|
|
41
41
|
- It would be great to get SpecRunner.html up and running in dev mode like: "dev": "parcel ./test/js/SpecRunner.html". [parcel issue 3407](https://github.com/parcel-bundler/parcel/issues/3407) may be key for that.
|
|
42
42
|
|
|
43
43
|
## References
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
|
|
45
|
+
- [Parcel - Getting Started](https://parceljs.org/getting_started.html)
|
|
46
|
+
- [Jasmine - Using Jasmine with node](https://jasmine.github.io/setup/nodejs.html)
|
|
47
|
+
- [Istanbul/nyc - Installation & Usage](https://github.com/istanbuljs/nyc#installation--usage)
|
|
48
|
+
- [ESLint - Getting Started](https://eslint.org/docs/user-guide/getting-started)
|