@suffolklitlab/alkiln 5.0.0-pre-4 → 5.0.0-pre-6

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/CHANGELOG.md CHANGED
@@ -45,20 +45,22 @@ Format:
45
45
  be run in any directory, not just in an npm package.
46
46
  - Additional environment variables and their validation to allow for tests that run on a developer's server/Playground instead of through GitHub. Also, other functionality for that purpose. [Issue #661](https://github.com/SuffolkLITLab/ALKiln/issues/661)
47
47
  - Tests for new session_vars behavior and improve previous tests.
48
+ - Adds `npm-shrinkwrap.json`, so installs from npm will have fixed version dependencies
48
49
 
49
50
  ### Changed
51
+ - BREAKING: the github action no longer runs `npm run XYZ`; it directly calls scripts,
52
+ e.g. `alkiln-setup`, `alkiln-run`, `alkiln-takedown`
50
53
  - upgraded cucumber v8.6.0
51
54
  - using cucumber's JS API to run tests. For more details on how it works,
52
55
  see [the cucumber-js docs](https://github.com/cucumber/cucumber-js/blob/main/docs/javascript_api.md).
53
- - the github action no longer runs `npm run XYZ`; it directly calls scripts,
54
- e.g. `alkiln-setup`, `alkiln-run`, `alkiln-takedown`
55
56
  - don't print the ["publish this cucumber report" message](https://github.com/cucumber/cucumber-js/blob/main/docs/configuration.md#options)
56
57
  - Adjusted validation of some environment variables to account for Playground vs. GitHub or local test runs. [Issue #661](https://github.com/SuffolkLITLab/ALKiln/issues/661)
57
- - Project name prefix now includes ALKiln in it for clarity
58
+ - Docassemble Project name prefix now includes ALKiln in it for clarity
58
59
 
59
60
  ### Fixed
60
61
  - Projects created in da each have a unique name. https://github.com/SuffolkLITLab/ALKiln/issues/663
61
62
  - Shorten path names to try to accommodate limitations of windows systems while still keeping enough useful information to help devs identify the test outputs. https://github.com/SuffolkLITLab/ALKiln/issues/618
63
+ - Updated field decoding to handle new object field encoding. See [#711](https://github.com/SuffolkLITLab/ALKiln/issues/711)
62
64
 
63
65
  ### Security
64
66
  - Pass docassemble API keys through HTTP headers instead of as parameters.
package/CONTRIBUTING.md CHANGED
@@ -112,6 +112,12 @@ Our tests require the user/developer to have a docassemble server on which they
112
112
 
113
113
  When the developer commits code to GitHub, their account triggers our code, passing along variables that our code needs, like their GitHub secret of the API key for their docassemble server developer account.
114
114
 
115
+ ## Updating dependencies
116
+
117
+ Sometimes you will have to add dependencies to ALKiln. You can do so by adding the dependency in the `package.json` "dependencies" section, specifying an exact version. Then, run `npm install` to update `npm-shrinkwrap.json` to have the new dependency.
118
+
119
+ If you have to update an existing dependency, you can change the version in `package.json`, and run `npm install` to update `npm-shrankwrap.json`.
120
+
115
121
  ## Very general architecture of files and folders
116
122
 
117
123
  An honest look at our current project architecture—some of our files and folders, what they do, and how they interact.
package/lib/scope.js CHANGED
@@ -285,7 +285,8 @@ module.exports = {
285
285
  getJSONFilename: async function( scope ) {
286
286
  // Get a unique path for a json file
287
287
  let { id } = await scope.examinePageID( scope, 'none to match' );
288
- let json_path = path.join( scope.paths.scenario, `json_for-${ id }-${ Date.now() }.json` );
288
+ let short_id = `${ id }`.substring(0, 20);
289
+ let json_path = path.join( scope.paths.scenario, `json_for-${ short_id }-${ Date.now() }.json` );
289
290
  return json_path;
290
291
  },
291
292
 
@@ -1211,7 +1212,7 @@ module.exports = {
1211
1212
  // Some fields have a key hidden inside them.
1212
1213
  // This gets the variable name before the final brackets, and the likely
1213
1214
  // still base64 encoded string inside the brackets
1214
- let before_and_in_brackets = expr_str.match( /^(.*)\[[BR]'(.*)'\]/ );
1215
+ let before_and_in_brackets = expr_str.match( /^(.*)\[[BRO]'(.*)'\]/ );
1215
1216
 
1216
1217
  // Of the format `foo[B'encoded']` or `foo[R'encoded']`
1217
1218
  // The B means internal to docassemble, the encoded portion is a string,