Skip to content

Commit 0a0d26c

Browse files
committed
Revert "Upgrade markdown-lint to v0.37.4 (#14015)"
This reverts commit a5945bd.
1 parent de3eb1c commit 0a0d26c

File tree

47 files changed

+319
-868
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+319
-868
lines changed

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,5 @@ destroy-dev-stack:
166166

167167
.PHONY: generate-compliance-pages
168168
generate-compliance-pages:
169-
node scripts/aws-compliance-scraper/scrape.cjs
169+
node scripts/aws-compliance-scraper/scrape.js
170170
./scripts/content/generate-compliance-pages.sh

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ search:
211211
212212
In this case, the optional `search.keywords` field is included to cover the terms `data warehouse`, as those terms don't exist in the page's title or description. If it weren't, queries for `data warehouse` would fail to match this particular page.
213213

214-
Certain fields also rank higher than others in terms of their overall relevance. (Titles and keywords, for example, are considered more relevant than descriptions.) For a full list of these rankings, along with all of the rules we apply to the search index, see the [search app in pulumi/docs](https://github.com/pulumi/docs/blob/master/scripts/search/settings.cjs).
214+
Certain fields also rank higher than others in terms of their overall relevance. (Titles and keywords, for example, are considered more relevant than descriptions.) For a full list of these rankings, along with all of the rules we apply to the search index, see the [search app in pulumi/docs](https://github.com/pulumi/docs/blob/master/scripts/search/settings.js).
215215

216216
### Keeping pages out of search results
217217

Diff for: content/blog/lambdas-as-lambdas-the-magic-of-simple-serverless-functions/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ look at how they look in action:
9696

9797
Let's still walk through it to see what's happening. It can be a little
9898
subtle because we are mixing *deployment-time* code -- code that
99-
declares infrastructure as code resources -- and *runtime* code --
99+
declares infrastructure as code resources -- and *runtime *code --
100100
application code that runs as a function.
101101

102102
First, we're just defining two simple resources: 1) an `s3.Bucket`,

Diff for: content/blog/meet-the-pulumi-team-at-aws-reinvent/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Heading to AWS re:Invent? Concerned about how you'll manage to get
1111
on bag? Or maybe you just like purple.
1212

1313
Whatever the reason, the Pulumi team will be there all week at **Booth
14-
316, Startup Central, Aria Quad,** and we'd love to chat with you about
14+
316, Startup Central, Aria Quad, **and we'd love to chat with you about
1515
[AWS and Pulumi](/crosswalk/aws/).
1616

1717
Catch up with us on serverless functions, [containers](/containers/) and

Diff for: content/blog/rabbitMQ-azure/index.md

-2
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,9 @@ We will start by defining a few constants, the constructor, an empty method call
7070
Now that we have our initial class, we can start writing methods for the resources we will be creating:
7171

7272
- Resource groups:
73-
7473
<br>
7574
{{< gist ItayPodhajcer 4c57e537f0d9cc15b801035d556c2504 >}}
7675
<br>
77-
7876
- Private DNS zone:
7977

8078
{{< gist ItayPodhajcer 52af6ba0a8f1a92d5352c3218505eefa >}}

Diff for: content/blog/snowflake-provider-launch/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ Pulumi is bringing management of your Snowflake resources into the same place as
2929
- Create a service user and push the key into the secrets manager of your choice
3030
- Rotate keys
3131

32-
You can check out the details in the official [Snowflake Provider documentation](/registry/packages/snowflake/api-docs/provider/), with
33-
references for Python, Go, TypeScript, and C#!
32+
You can check out the details in the official [Snowflake Provider documentation
33+
](/registry/packages/snowflake/api-docs/provider/), with references for Python, Go, TypeScript, and C#!

Diff for: content/blog/using-helm-and-pulumi-to-define-cloud-native-infrastructure-as-code/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Specifically, we:
4242
If you have the Azure command line, try [running the example](https://github.com/pulumi/examples/tree/master/classic-azure-ts-aks-mean)
4343
with `pulumi up`!
4444

45-
```javascript
45+
{{< highlight javascript >}}
4646
import * as k8s from "@pulumi/kubernetes";
4747
import * as azure from "@pulumi/azure";
4848
import * as mongoHelpers from "./mongoHelpers";
@@ -90,7 +90,7 @@ const node = new k8s.helm.v2.Chart(
9090
},
9191
{ providers: { kubernetes: k8sProvider }, dependsOn: mongoConnStrings }
9292
);
93-
```
93+
{{< /highlight >}}
9494

9595
Pulumi supports deploying resources to all the major cloud vendors, as
9696
well as Kubernetes. Using the Pulumi programming model, it is possible

Diff for: content/docs/iac/clouds/kubernetes/guides/configure-access-control.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,13 @@ $ kubectl delete --namespace=`pulumi stack output appsNamespaceName` pod/nginx s
288288

289289
For a complete example of this in action, see [Simplifying Kubernetes
290290
RBAC in Amazon EKS][simplify-rbac].
291+
[simplify-rbac]: /blog/simplify-kubernetes-rbac-in-amazon-eks-with-open-source-pulumi-packages/
291292

292293
{{% /choosable %}}
293294

294295
See the [official Kubernetes RBAC docs][k8s-rbac-docs] for more details.
295296

296297
<!-- markdownlint-disable url -->
297-
[simplify-rbac]: /blog/simplify-kubernetes-rbac-in-amazon-eks-with-open-source-pulumi-packages/
298298
[crosswalk-identity]: /docs/clouds/kubernetes/guides/identity/
299299
[k8s-rbac-docs]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
300300
[crosswalk-configure-defaults]: /docs/clouds/kubernetes/guides/configure-defaults/

Diff for: content/docs/iac/get-started/kubernetes/deploy-changes.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ $ pulumi stack output ip
7373

7474
> **If using Minikube:** Minikube does not support type `LoadBalancer`. Instead, forward the nginx service:
7575
>
76-
> ```bash
77-
> $ kubectl get service
78-
> NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
79-
> kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 44h
80-
> nginx-9e5d5cd4 ClusterIP 10.103.199.118 <none> 80/TCP 6m47s
81-
> ```
76+
> ```bash
77+
> $ kubectl get service
78+
> NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
79+
> kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 44h
80+
> nginx-9e5d5cd4 ClusterIP 10.103.199.118 <none> 80/TCP 6m47s
81+
> ```
8282
>
8383
> Note: The assigned name for this particular nginx service is `nginx-9e5d5cd4`; yours will be different. In a new terminal window, run:
8484
>

Diff for: content/docs/pulumi-cloud/access-management/access-tokens.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ Pulumi offers three types of access tokens:
2525

2626
1. Personal tokens, which map to the permissions of an individual user. Personal tokens are available to all Pulumi Cloud users.
2727
1. Organization tokens, which map to the permissions of either a regular organization member or an organization admin, depending on the scope of the token. Organization tokens are only available to Enterprise and Business Critical customers.
28-
1. Team tokens, which map to the permissions of a team within an organization. For more information on using teams within your Pulumi Cloud organization, see [Teams & Role-based access control (RBAC)](/docs/pulumi-cloud/access-management/teams/). Team tokens are only available to Enterprise and Business Critical customers.
28+
1. Team tokens, which map to the permissions of a team within an organization. For more information on using teams within your Pulumi Cloud organization, see [Teams & Role-based access control (RBAC)
29+
](/docs/pulumi-cloud/access-management/teams/). Team tokens are only available to Enterprise and Business Critical customers.
2930

3031
When using tokens, be mindful of the following security best practices:
3132

Diff for: content/templates/container-service/_index.md

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ weight: 1
1313
[Containers](/containers/) are lightweight virtualized operating system environments in which developers can package and run an application and its dependencies as isolated runtime environments. The benefits of containers include better scalability, portability, and fault isolation. Docker is most commonly used to create container images. Containers are great for scenarios such as microservices, batch jobs, and migrating a legacy application. In the cloud, containers are typically run using container services that manage the container orchestration, cluster management, and compute for you.
1414

1515
**On AWS,** these are the main ways to run containers:
16-
1716
| | |
1817
|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
1918
| Amazon Elastic Container Service (ECS) | Fully managed container orchestration service created by AWS. Deploy containers to EC2 instances you manage or serverless instances from AWS Fargate. |

Diff for: cypress.config.cjs

-7
This file was deleted.

Diff for: cypress.config.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from "cypress";
2+
3+
export default defineConfig({
4+
e2e: {
5+
// We've imported your old cypress plugins here.
6+
// You may want to clean this up later by importing these.
7+
setupNodeEvents(on, config) {
8+
return require("./cypress/plugins/index.js")(on, config);
9+
},
10+
baseUrl: "http://localhost:1313",
11+
},
12+
});

Diff for: cypress/plugins/index.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/// <reference types="cypress" />
2+
// ***********************************************************
3+
// This example plugins/index.js can be used to load plugins
4+
//
5+
// You can change the location of this file or turn off loading
6+
// the plugins file with the 'pluginsFile' configuration option.
7+
//
8+
// You can read more here:
9+
// https://on.cypress.io/plugins-guide
10+
// ***********************************************************
11+
12+
// This function is called when a project is opened or re-opened (e.g. due to
13+
// the project's config changing)
14+
15+
/**
16+
* @type {Cypress.PluginConfig}
17+
*/
18+
module.exports = (on, config) => {
19+
// `on` is used to hook into various events Cypress emits
20+
// `config` is the resolved Cypress config
21+
}

Diff for: package.json

+6-12
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44
"private": true,
55
"license": "Apache-2.0",
66
"scripts": {
7-
"minify-css": "node scripts/minify-css.cjs",
8-
"lint-markdown": "tsx ./scripts/lint/lint-markdown.ts",
9-
"build-search-index": "tsx ./scripts/search/main.ts",
10-
"check-urls": "tsx ./scripts/search/check-urls.ts",
7+
"minify-css": "node scripts/minify-css.js",
118
"prepare": "husky"
129
},
13-
"type": "module",
1410
"dependencies": {
1511
"@aws-sdk/client-s3": "^3.427.0",
1612
"@fullhuman/postcss-purgecss": "^4.0.3",
@@ -19,7 +15,6 @@
1915
"@octokit/graphql": "^4.6.2",
2016
"@octokit/rest": "^18.5.3",
2117
"@slack/web-api": "^5.12.0",
22-
"@types/node": "^22.13.1",
2318
"algoliasearch": "^4.17.0",
2419
"axios": "^1.7.4",
2520
"axios-retry": "^3.5.1",
@@ -33,19 +28,18 @@
3328
"http-server": "^0.12.1",
3429
"js-yaml": "^4.1.0",
3530
"jsdom": "^22.0.0",
31+
"markdownlint": "^0.17.2",
3632
"parse-diff": "^0.8.1",
3733
"postcss": "^8.3.7",
3834
"postcss-cli": "^8.3.1",
3935
"sitemapper": "^3.2.2",
4036
"turndown": "^7.2.0",
41-
"typedoc": "^0.27.0",
42-
"typedoc-plugin-script-inject": "^1.0.0"
37+
"typedoc": "^0.25.11",
38+
"typedoc-plugin-script-inject": "^1.0.0",
39+
"typescript": "^4.9.5"
4340
},
4441
"devDependencies": {
4542
"husky": "^9.0.11",
46-
"markdownlint": "^0.37.4",
47-
"prettier": "^2.6.2",
48-
"tsx": "^4.19.2",
49-
"typescript": "^5.7.0"
43+
"prettier": "^2.6.2"
5044
}
5145
}
File renamed without changes.
File renamed without changes.

Diff for: scripts/build-site.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ else
4444
fi
4545

4646
# Generate docs JSON.
47-
node scripts/content/generate-docs-content.cjs
47+
node scripts/content/generate-docs-content.js
4848

4949
# Purge unused CSS.
5050
yarn run minify-css

Diff for: scripts/ci-push.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ source ./scripts/ci-login.sh
99

1010
./scripts/generate-search-index.sh
1111

12-
node ./scripts/await-in-progress.cjs
12+
node ./scripts/await-in-progress.js
1313

1414
./scripts/run-pulumi.sh update
1515
./scripts/make-s3-redirects.sh

Diff for: scripts/ci-update-search-index.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
# This script downloads the search indexes for registry and docs from pulumi.com then combines
44
# the two indexes and pushes them to Algolia.
5-
node ./scripts/search/update-search-index.cjs "$1"
5+
node ./scripts/search/update-search-index.js "$1"
File renamed without changes.
File renamed without changes.

Diff for: scripts/detect-new-404s.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ s3_website_url="http://${destination_bucket}.s3-website.$(aws_region).amazonaws.
1111

1212
echo "Checking ${s3_website_url} for new 404s..."
1313
# For now we don't want this to fail the build due to lots of flakiness, so always exit successfully.
14-
node scripts/detect-new-404s.cjs "https://pulumi.com" "${s3_website_url}" || true
14+
node scripts/detect-new-404s.js "https://pulumi.com" "${s3_website_url}" || true

Diff for: scripts/generate-search-index.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -o errexit -o pipefail
44

55
source ./scripts/common.sh
66

7-
yarn run build-search-index
7+
node ./scripts/search/main.js
88

99
# Fetch the name of the bucket from the metadata file.
1010
destination_bucket="$(cat "$(origin_bucket_metadata_filepath)" | jq -r ".bucket")"
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: scripts/link-checker/check-links.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ source ./scripts/common.sh
66
echo "Checking links..."
77

88
base_url="$1"
9-
node "./scripts/link-checker/check-links.cjs" "$base_url" 2
9+
node "./scripts/link-checker/check-links.js" "$base_url" 2

Diff for: scripts/lint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
set -o errexit -o pipefail
44

5-
yarn run lint-markdown
5+
node ./scripts/lint/lint-markdown.js
66
yarn prettier --check .

Diff for: scripts/lint/lint-markdown.ts renamed to scripts/lint/lint-markdown.js

+7-22
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
import * as fs from "fs";
2-
import * as yaml from "js-yaml";
3-
import * as markdownlint from "markdownlint/sync";
4-
import * as path from "path";
5-
import { fileURLToPath } from 'url';
6-
7-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
1+
const fs = require("fs");
2+
const yaml = require("js-yaml");
3+
const markdownlint = require("markdownlint");
4+
const path = require("path");
85

96
/**
107
* REGEX for grabbing the front matter of a Hugo markdown file. Example:
@@ -277,6 +274,8 @@ const opts = {
277274
// Allow all code block styles in a file. Code block styles
278275
// are created equal and we shall not discriminate.
279276
MD046: false,
277+
// Allow indents on unordered lists to be 4 spaces instead of 2.
278+
MD007: { indent: 4 },
280279
// Allow duplicate headings.
281280
MD024: false,
282281
// Allow headings to be indendented.
@@ -289,20 +288,6 @@ const opts = {
289288
MD034: false,
290289
// Allow bold/italicized paragraphs
291290
MD036: false,
292-
// Images should have alternate text (alt text)
293-
MD045: false,
294-
// Emphasis style
295-
MD049: false,
296-
// Strong style
297-
MD050: false,
298-
// Link fragments should be valid
299-
MD051: false,
300-
// Link and image reference definitions should be needed
301-
MD053: false,
302-
// Table pipe style
303-
MD055: false,
304-
// Table column count
305-
MD056: false,
306291
},
307292
customRules: [
308293
{
@@ -328,7 +313,7 @@ const opts = {
328313
};
329314

330315
// Lint the markdown files.
331-
const result = markdownlint.lint(opts);
316+
const result = markdownlint.sync(opts);
332317

333318
// Group the lint errors by file.
334319
const errors = groupLintErrorOutput(result);
File renamed without changes.

Diff for: scripts/make-s3-redirects.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ redirects_file="./redirects.txt"
1414
aws s3 cp "s3://${destination_bucket}/redirects.txt" "$redirects_file" --region "$(aws_region)"
1515

1616
echo "Processing S3 redirects for ${destination_bucket}..."
17-
node scripts/make-s3-redirects.cjs "${destination_bucket}" "${build_dir}/redirects.txt" "$(aws_region)"
17+
node scripts/make-s3-redirects.js "${destination_bucket}" "${build_dir}/redirects.txt" "$(aws_region)"
1818

1919
echo "Processing custom redirects in scripts/redirects..."
2020
ls -l "./scripts/redirects/" | tail -n +2 | awk '{print $9}' | while read line; do
2121
redirect_file="./scripts/redirects/$line"
22-
node scripts/make-s3-redirects.cjs "${destination_bucket}" "${redirect_file}" "$(aws_region)"
22+
node scripts/make-s3-redirects.js "${destination_bucket}" "${redirect_file}" "$(aws_region)"
2323
done
File renamed without changes.

Diff for: scripts/search/check-urls.ts renamed to scripts/search/check-urls.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as fs from "fs";
2-
import { default as axios } from "axios";
3-
import retry from 'axios-retry';
1+
const fs = require("fs");
2+
const axios = require("axios").default;
3+
const retry = require("axios-retry");
44

55
async function checkSearchURLs(baseURL) {
66

Diff for: scripts/search/check-urls.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ algolia objects browse "$index" \
1313
--admin-api-key "$ALGOLIA_APP_ADMIN_KEY" \
1414
--application-id "$ALGOLIA_APP_ID" > ./public/search-index.json
1515

16-
yarn run check-urls "$base_url"
16+
node "./scripts/search/check-urls.js" "$base_url"

Diff for: scripts/search/main.ts renamed to scripts/search/main.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as fs from "fs";
2-
import { getPrimaryObjects, getSecondaryObjects, getObjectID } from "./page";
1+
const fs = require("fs");
2+
const page = require("./page");
33

44
// As part of the Hugo build, we generate a JSON file at /index.json containing a record for every
55
// page of the website. We use this file to generate primary search records for Algolia.
@@ -9,12 +9,12 @@ const hugoPageItems = JSON.parse(fs.readFileSync(pathToFullSiteJSON, "utf-8").to
99
// Generate a list of primary page objects. This list contains one record for every page of the site.
1010
console.log("\nBuilding search index...");
1111
console.log(" ↳ Building primary page objects...");
12-
const primaryPageObjects = getPrimaryObjects(hugoPageItems);
12+
const primaryPageObjects = page.getPrimaryObjects(hugoPageItems);
1313

1414
// Generate a list of secondary objects. This list contains additional records for things like H2
1515
// headings and other DOM-resident content that we can't get as easily by other means.
1616
console.log(" ↳ Building secondary page objects...");
17-
const secondaryPageObjects = getSecondaryObjects(primaryPageObjects);
17+
const secondaryPageObjects = page.getSecondaryObjects(primaryPageObjects);
1818

1919
// Incorporate any additional objects. This list is provided as a hand-crafted list for now, because pragmatism,
2020
// but it should probably be pulled out into a proper module at some point.
@@ -93,7 +93,7 @@ const additionalObjects = [
9393
},
9494
].map(item => {
9595
return {
96-
"objectID": getObjectID({ href: item.href }),
96+
"objectID": page.getObjectID({ href: item.href }),
9797
...item,
9898
};
9999
});

0 commit comments

Comments
 (0)