Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
fix(deps): convert to esm, cleanup tests and update unify ecosystem libs
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored Dec 16, 2021
1 parent b2d075f commit 6e6c785
Show file tree
Hide file tree
Showing 136 changed files with 9,617 additions and 7,907 deletions.
17 changes: 16 additions & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Adobe. All rights reserved.
* Copyright 2021 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
Expand All @@ -13,7 +13,18 @@
module.exports = {
root: true,
extends: '@adobe/helix',
env: {
node: true,
es6: true,
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
rules: {
'import/extensions': [2, 'ignorePackages'],
'import/prefer-default-export': 0,

// Allow while (true) infinite loops
'no-constant-condition': ['error', { checkLoops: false }],

Expand All @@ -24,4 +35,8 @@ module.exports = {
// parameters is definitely desirable
'no-param-reassign': 'off',
},
globals: {
__rootdir: true,
__testdir: true,
},
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ pipeline.log
logs/pipeline.log
.nyc_output
logs/debug
coverage
coverage
junit/
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
6 changes: 6 additions & 0 deletions .mocha-multi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"reporterEnabled": "spec,xunit",
"xunitReporterOptions": {
"output": "junit/test-results.xml"
}
}
10 changes: 10 additions & 0 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"reporter": [
"lcov",
"text"
],
"check-coverage": true,
"lines": 77,
"branches": 67,
"statements": 77
}
File renamed without changes.
9 changes: 4 additions & 5 deletions bin/schema2ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
*/

/* eslint-disable import/no-extraneous-dependencies */
const { compileFromFile } = require('json-schema-to-typescript');
const { writeFileSync } = require('fs-extra');
const fs = require('fs-extra');
import { compileFromFile } from 'json-schema-to-typescript';
import fs from 'fs-extra';

const options = {
$refOptions: {
Expand Down Expand Up @@ -52,5 +51,5 @@ const options = {
*/`,
};

compileFromFile('docs/context.schema.json', options).then((ts) => writeFileSync('src/context.d.ts', ts));
compileFromFile('docs/action.schema.json', options).then((ts) => writeFileSync('src/action.d.ts', ts));
compileFromFile('docs/context.schema.json', options).then((ts) => fs.writeFileSync('src/context.d.ts', ts));
compileFromFile('docs/action.schema.json', options).then((ts) => fs.writeFileSync('src/action.d.ts', ts));
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

* [Action](./action.md "Tracks the OpenWhisk action invocation")`https://ns.adobe.com/helix/pipeline/action`

* [Content](./content.md "The content as retrieved from the repository and enriched in the pipeline")`https://ns.adobe.com/helix/pipeline/content`
* [Content](./content.md "The content object represents the content that is being processed in the pipeline")`https://ns.adobe.com/helix/pipeline/content`

* [Context](./context.md "The context thingie")`https://ns.adobe.com/helix/pipeline/context`

* [MDAST](./mdast.md "A node in the Markdown AST")`https://ns.adobe.com/helix/pipeline/mdast`
* [MDAST](./mdast.md "The Markdown AST is 100% API compatible with the UnifiedJS MDAST data structure")`https://ns.adobe.com/helix/pipeline/mdast`

* [Meta](./meta.md "Content and Section Metadata Properties")`https://ns.adobe.com/helix/pipeline/meta`

Expand Down
10 changes: 9 additions & 1 deletion docs/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
https://ns.adobe.com/helix/pipeline/content
```

The content as retrieved from the repository and enriched in the pipeline.
The `content` object represents the content that is being processed in the pipeline.

With each step of the pipeline, the `content` will be enriched and gain additional properties.

In a typical processing, `content` will start empty, and then gain a [`body`](#body) as the resource is fetched from the content repository.

In the second step, the `body` will be parsed using a Markdown parser, resulting in the populated [`mdast`](#mdast) property, which is a representation of the Markdown.

After that, the Markdown AST is processed furthermore to extract [`sections`](#meta), [`title`](#title), [`intro`](#intro), and [`meta`](#meta).

| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
| :------------------ | :--------- | :---------- | :----------- | :---------------- | :-------------------- | :------------------ | :---------------------------------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/content.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/mdast-properties-align-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ https://ns.adobe.com/helix/pipeline/mdast#/properties/align/items
| `"left"` | |
| `"right"` | |
| `"center"` | |
| `"none"` | |
| `null` | |
4 changes: 3 additions & 1 deletion docs/mdast.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
https://ns.adobe.com/helix/pipeline/mdast
```

A node in the Markdown AST
The Markdown AST is 100% API compatible with the [UnifiedJS MDAST](https://github.com/syntax-tree/mdast) data structure.

All [MDAST Utilities](https://github.com/syntax-tree/mdast#list-of-utilities) are compatible and can be used for easy processing of MDAST trees.

| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
| :------------------ | :--------- | :----- | :----------- | :---------------- | :-------------------- | :------------------ | :------------------------------------------------------------ |
Expand Down
Loading

0 comments on commit 6e6c785

Please sign in to comment.