Commit Graph

73 Commits

Author SHA1 Message Date
dependabot[bot] 3b06458cd0 build(deps-dev): bump braces in /docs/website/scripts/live-blocks (#6820)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 14:07:25 +02:00
occupyhabit d6c8c1b51b chore: remove repetitive words
Signed-off-by: occupyhabit <wangmengjiao@outlook.com>
2024-03-25 11:28:12 -07:00
dependabot[bot] 71f5afc0f7 build(deps-dev): bump @babel/traverse (#6322)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.14.5 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 17:49:30 +01:00
dependabot[bot] 2347a7e81b build(deps-dev): bump postcss in /docs/website/scripts/live-blocks (#6279)
Bumps [postcss](https://github.com/postcss/postcss) from 8.3.2 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.3.2...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 17:29:56 +01:00
Charlie Egan a7fa31d56e [docs] Fix unversioned built-in docs issue (#6274)
Fixes https://github.com/open-policy-agent/opa/issues/6269

This fixes the issue by using the builtin_metadata.json file from each
version, the assumption that docs content that depends on the data
doesn't exist before this file was introduced.

I have removed the 'available' check since we haven't consistently
updated the file in the past, e.g.

* https://github.com/open-policy-agent/opa/blob/v0.41.0/builtin_metadata.json#L12710
* https://github.com/open-policy-agent/opa/blob/v0.57.0/builtin_metadata.json#L563

These examples show that sometimes the current version is included,
other times the file is updated after the release.

Video showing the correct content being displayed for various versions:

https://github.com/open-policy-agent/opa/assets/1774239/abf1af7d-9c59-4223-a019-c73d7550b322

To locally test this:

```
git clean -dfx
cd docs
make generate hugo-production-build
hugo server --source website --contentDir generated --ignoreCache --minify
```

Signed-off-by: Charlie Egan <charlie@styra.com>
2023-10-05 09:28:40 +01:00
Charlie Egan eb03ff229d [website] Include static hugo pages in prod build (#6001)
This was only added for dev in https://github.com/open-policy-agent/opa/pull/5984/files#diff-cdec797dddf8fc387304501d6bd4f318e1e9067c6fae012dfa8b69fd85fd3248R33

I missed this as I thought the preview would run the prod commands

Signed-off-by: Charlie Egan <charlie@styra.com>
2023-06-12 11:46:52 +01:00
Charlie Egan 2b2cb12efd [docs] Address anchor linking issue (#5795)
This addresses an issue where the old hacky way of padding an anchor
(which I added) messed with the flow of linking to anchors in tables.

This makes a few changes:
- hides banners with display none rather than removing them using a
  class on the parent
- makes the article content sticky
- makes the hight of the article content change based on if the banner
  is showing or not.

Signed-off-by: Charlie Egan <charlie@styra.com>
2023-03-29 12:57:31 +01:00
dependabot[bot] 0542fee157 build(deps): bump json5 and postcss-modules (#5512)
Bumps [json5](https://github.com/json5/json5) and [postcss-modules](https://github.com/css-modules/postcss-modules). These dependencies needed to be updated together.

Updates `json5` from 2.2.0 to 2.2.3
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

Updates `postcss-modules` from 4.1.3 to 4.3.1
- [Release notes](https://github.com/css-modules/postcss-modules/releases)
- [Changelog](https://github.com/madyankin/postcss-modules/blob/master/CHANGELOG.md)
- [Commits](https://github.com/css-modules/postcss-modules/compare/v4.1.3...v4.3.1)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
- dependency-name: postcss-modules
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 09:27:49 +01:00
dependabot[bot] 1343e0f85a build(deps): bump loader-utils in /docs/website/scripts/live-blocks (#5396)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-17 17:13:30 +01:00
dependabot[bot] da2fb4b12f build(deps): bump loader-utils in /docs/website/scripts/live-blocks (#5371) 2022-11-08 12:34:34 +00:00
Stephan Renatus 482769dd12 nightly: address recent findings, update trivyignore (#5287)
This is a bit of a bag of a few smaller things:

* workflows/nightly: skip imported gqlparser package.json
   It is not used anywhere.

* .trivyignore: remove docker CVE
   This has been bumped away when updating ORAS.

* website/livescripts: bump minimatch
   This also updated the lockfile version... I think that's OK.

* workflows/pull-request: don't setup opa for docker image smoke test
* address netlify ignore script failure on large output

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-10-21 12:06:38 +02:00
dependabot[bot] c531fc1c40 build(deps): bump terser in /docs/website/scripts/live-blocks (#4909)
Bumps [terser](https://github.com/terser/terser) from 5.7.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-20 07:30:26 +02:00
dependabot[bot] fcdba41912 build(deps-dev): bump glob-parent in /docs/website/scripts/live-blocks (#4906)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v6.0.0...v6.0.1)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-19 16:11:48 +02:00
Stephan Renatus a7e1b41c15 website/live-blocks: update codemirror-rego to 1.3.0 (#4864)
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-07-08 12:18:46 +02:00
Stephan Renatus 25bd3df7f3 website/live-blocks: only pass 'import future.keywords' when needed and supported (#4845)
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-07-06 11:12:30 +02:00
Stephan Renatus a2994150f5 website/live-blocks/preprocess: allow queries with future keywords
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-06-22 10:36:06 +02:00
dependabot[bot] 5a6b0b1c5b build(deps): bump nanoid in /docs/website/scripts/live-blocks (#4501) 2022-03-28 07:54:58 +00:00
Stephan Renatus 3297a69e6b build(dev-deps): update live-scripts deps: mocha, nanoid (#4500)
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-03-28 09:41:50 +02:00
Stephan Renatus 28c299b6f3 website/live-blocks: don't call the github api to determine release asset urls
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-03-25 14:40:41 +01:00
Stephan Renatus a16964d4c8 website/live-blocks: update caniuse/browserlist
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-03-25 14:40:41 +01:00
Stephan Renatus e09b04f2a9 website: make local dev and PR preview not build everything (#4474)
With this change, the work done for local development, and the per-PR netlify preview changes:

It will no longer include the website stuff for versions other than edge, the current working tree.

We thus save us the time, and the flakiness, involved with

- checking if github has release binaries for all the versions
- checking out their sources
- fetching the release binaries to pre-hydrate old versions' live-blocks.

The previously-used, documented make target should still be intact.

Fixes #4379 to some extent, I hope.

* docs/website: remove "latest" binary from opa versions cache

Having a stale binary here -- one called "latest" but not actually
being "latest" -- causes issues like this: when building the website
content for the (real) latest version, the script would take the
old (previous-latest) binary, and fail because that binary didn't
know the latest future keywords.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-03-25 09:59:44 +01:00
dependabot[bot] 6479b80386 build(deps-dev): bump minimist in /docs/website/scripts/live-blocks (#4473)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 14:41:46 +01:00
Peter ONeill 6991b00f08 website: Community Webpage Updates (#4390)
- Added two more community champions
- Removed enterprise support from community page
- Changed blurry line to solid line
- Updated newsletter signup from Medium to Mailchimp
- add hugo lock to gitignore

Signed-off-by: Peter ONeill <peteroneilljr@gmail.com>
2022-03-01 07:30:12 +01:00
dependabot[bot] 01ca4a6902 build(deps): bump ansi-regex in /docs/website/scripts/live-blocks (#4308)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-31 12:49:39 +01:00
Stephan Renatus c9b6a3c5e3 website/live-blocks: bump node-fetch (2.6.1 -> 2.6.7) (#4269)
This fixes a security issue with redirects:

https://github.com/node-fetch/node-fetch/releases/tag/v2.6.7

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-01-23 18:19:01 +01:00
Stephan Renatus 429cfe78a2 website/load-docs.sh: add versioned docs for latest version (#4222)
With this change, we should get both a /docs/v0.36.1 and a /docs/latest
in our deployed docs.

Before, the symlink would have made hugo only build a /docs/latest,
but not the other link.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-01-13 11:41:17 +01:00
Stephan Renatus 94ec32e402 website: bump to hugo to 0.88.1, adapt code and live-blocks (#3986)
* website: bump hugo, updated templates

For some reason, the "and" trick to step around undefined values no longer
worked. So now, we're wrapping {{ if }} conditionals instead: the outer one
checks that the value is defined, the inner one asserts something on its
value.

* live-blocks/preprocess: add wrapper div, remove newline

Somewhere between 0.55 and the most recent version, Hugo stopped emitting
that div on purpose for languages it didn't know.

Since we depend on it for further processing, we're adding it back.

Also, a trailing newline for code elements was introduced, and that broke
our codemirrors integration -- every code entry would be folllowed by an
empty line. Now, we're removing that in the same preprocess step.

* website: fix info|danger blocks
* website/config: trust markdown to include html

Fixes #3787.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-11-09 09:45:31 +01:00
Stephan Renatus 64cff0c5d3 website/load-docs: skip first, check later (#3987)
The website deployment takes longer than it has to because we're
checking for binaries we don't really care about: those predating
the website, and those of release candidates.

Now, we'll only curl for those we don't skip.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-11-08 14:29:44 +01:00
Torin Sandall 6fdd7f5b87 website: Do not build for versions without a GitHub release (#3982)
This should avoid transient errors when the site builds while the
release is still in-progress.

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2021-11-06 07:54:48 +01:00
Stephan Renatus 79dbbb2450 website/build: misc changes to website build scripts (#3886)
* website/scripts/load-docs.sh: less verbose output

1. Less output: the tag semver ordering isn't something we work
   on daily, so let's silence that.

2. Use 'git archive' and tar, not a checkout:
   this way, we don't mess up the working directory or reflog. It
   should also be faster, since we don't end up writing all the
   vendor files, binary blobs, etc to disk.

3. Make the 'latest' symlink relative.

* scripts/live-blocks/inject: run preprocess with max allowed args

Before, when attempting to do this, I had used

    find ... -exec npm run preprocess {} +

and find had determined what the maximum number of allowed command
line args were, and executed that call in batches of those. `npm`,
however, would have prepended the call with its own args, thereby
exceeding the limit.

As a way out, we had used `xargs -n200`, to preprocess the files
in batches of 200 at a time.

Now, we're telling `find` the exact command needed, bypassing the
package.json helper definition.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-10-13 17:59:59 +02:00
Stephan Renatus 6fb007111e deps(live-blocks): update mocha (9.1.2) to bump ansi-regex (#3866)
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-10-06 14:17:58 +02:00
Stephan Renatus 2c69c27a66 live-blocks: update rollup-postcss-plugin (4.0.1) and nth-check (2.0.1) (#3865)
Changing 4.0.0 -> 4.0.1 of rollup-postcss-plugin, `npm install` reports:

    added 6 packages, removed 187 packages, changed 37 packages, and audited 482 packages in 4s

Not bad for a patch release. I think all traces of nth-check 1.x.y in
live-blocks should be gone now.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-10-06 12:36:16 +02:00
Stephan Renatus 6c91c5865d build: fix netlify build (#3845)
With more and more version appearing, the argument count passed to the
`npm run` call through the shell glob had increased, too -- to a point
where execution was impossible because it had reached a hard limit.

The obvious fix would have been to use `find [...] -exec cmd {} +` or
`find [...] -print0 | xargs -0 cmd`, however, since the npm call builds
another command line that's executed, we'd step over that limit again.

So instead, we'll now run the npm script on batches of 200 files. It's
below the maximum (unclear what it is, I haven't dug that deep), and
still fast enough (running it file-by-file takes 15+minutes).

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-10-01 22:07:52 +02:00
Anders Eknert 040481b426 Bump live blocks dependencies
Signed-off-by: Anders Eknert <anders@eknert.com>
2021-06-15 09:32:52 -04:00
Will Beason 3be1d08b87 Change check-lint to use golangci-lint (#3465)
golint is deprecated. The author of the code no longer supports the
codebase. golangci-lint is faster than golint, and is in use by other
opa repositories (e.g. Gatekeeper).

This commit changes tools.go to reference golangci (so it ends up in
vendor) and modifies check-lint to use golangci instead.

Breaking API Changes:

- plugins/rest/rest.go: Fix typo "AllowInsureTLS" -> "AllowInsecureTLS"
- storage/errors.go: Removed unused IndexingNotSupportedErr

Signed-off-by: Will Beason <willbeason@google.com>
2021-05-19 07:52:02 +02:00
Anders Eknert b08313068b Bump lodash dependency
Signed-off-by: Anders Eknert <anders@eknert.com>
2021-05-13 12:50:27 -04:00
dependabot[bot] 4b72f50f8b build(deps-dev): bump postcss in /docs/website/scripts/live-blocks (#3457)
Bumps [postcss](https://github.com/postcss/postcss) from 8.2.8 to 8.2.10.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.2.8...8.2.10)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 15:57:33 +02:00
dependabot[bot] 94436b780d build(deps): bump codemirror in /docs/website/scripts/live-blocks (#3455)
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.48.4 to 5.58.2.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.48.4...5.58.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 15:42:53 +02:00
Anders Eknert 710b8574f5 Commit package-lock.json (#3316)
Also print info when deps are not installed.

Signed-off-by: Anders Eknert <anders@eknert.com>
2021-03-25 10:26:46 +01:00
Anders Eknert 00f14643fb Live blocks depedency updates (#3315)
Should fix annoying dependabot warning.

Live blocks functionality tested with make serve-local and
remotely using Netlify. Both seems to work as before.

Signed-off-by: Anders Eknert <anders@eknert.com>
2021-03-25 09:19:02 +01:00
dependabot[bot] 724c0bb0be build(deps): bump node-fetch in /docs/website/scripts/live-blocks
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-14 10:31:14 -07:00
Patrick East 19f1d89d03 docs: Update live-blocks dependencies
Using `npm audit fix` update dependencies of the live-blocks tooling.

This corrects all severe ones that can be corrected without pulling
library versions that include breaking changes.

Signed-off-by: Patrick East <east.patrick@gmail.com>
2020-08-12 12:37:21 -07:00
dependabot[bot] 2105a28fbf build(deps-dev): bump serialize-javascript
Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 2.1.2 to 3.1.0.
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](https://github.com/yahoo/serialize-javascript/compare/v2.1.2...v3.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-12 10:05:30 -07:00
dependabot[bot] 3adbee084c build(deps): bump lodash in /docs/website/scripts/live-blocks
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-20 10:39:29 -07:00
Patrick East 7002b6f92b Add support for release candidate version tags
Any release tag with a `rc` string in the the semver
will be ignored for the docs on the website and will _not_ update the
"latest" docker image tag, or "latest" downloads url.

Signed-off-by: Patrick East <east.patrick@gmail.com>
2020-03-26 11:55:49 -07:00
Patrick East 1fdb3264db docs: Update minimist dev tool dependency
More follow on to fixing our dev tooling for the website for:

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7598

Signed-off-by: Patrick East <east.patrick@gmail.com>
2020-03-16 18:13:47 -07:00
Patrick East 015e1b5291 docs: Update acorn to fix CVE with dev tooling
Fixing https://github.com/advisories/GHSA-7fhm-mqm4-2wp7

This also fixes the unit tests (not sure how long they've been borken)
and makes them run as part of the netlify preview build, so any
regressions should be seen in PR's.

Signed-off-by: Patrick East <east.patrick@gmail.com>
2020-03-16 17:52:02 -07:00
Lawrence Gripper f874165aa2 Increase liveblock button size
Signed-off-by: Lawrence Gripper <info@grippers.co.uk>
2020-01-15 12:57:49 -08:00
Patrick East 11503a770c Update serialize-javascript for live-blocks tooling
There is a known security issue with the older version. Updating to
the latest mitigates the risk.

Signed-off-by: Patrick East <east.patrick@gmail.com>
2019-12-10 10:03:45 -08:00
Patrick East 731dc1883a docs/website: Fix live-blocks interaction on edge/live pages
This was changed as part of the homepage rework but ended up being
both unused and broken.. so reverting it back to the way it was
before.

The live blocks on the home page are not interactive, so this works
out fine as-is. In the future we may need to revisit.

Signed-off-by: Patrick East <east.patrick@gmail.com>
2019-12-09 09:39:41 -05:00