Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(v2): prepare v2.0.0.alpha-68 release #3779

Merged
merged 6 commits into from Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
173 changes: 173 additions & 0 deletions CHANGELOG-2.x.md

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions admin/publish.md
Expand Up @@ -121,9 +121,9 @@ An example PR would be [#3114](https://github.com/facebook/docusaurus/pull/3114)

Stay on your local branch `<your_username>/<version_to_release>`

As we have a monorepo structure, we use `lerna publish --exact` to publish the new version of packages to npm in one shot.
As we have a monorepo structure, we use `lerna publish ... --exact` to publish the new version of packages to npm in one shot.

`--exact` is important to ensure we keep using fixed versions (without the ^ prefix added by Lerna).
Using the `--exact` is important to ensure we keep using fixed versions (without the ^ prefix added by Lerna).

First, be sure to run the command below to verify that you have access to all the necessary repositories.

Expand Down Expand Up @@ -159,7 +159,7 @@ npm access ls-packages
</pre>
</details>

It can happen that some accesses not granted, as an admin might add you to the @docusaurus NPM organization, but you don't have access to the packages that are not in that organization.
It can happen that some accesses are not granted, as an admin might add you to the @docusaurus NPM organization, but you don't have access to the packages that are not in that organization.

Please **double-check your permissions on these 3 packages**, otherwise you'll publish a half-release and will have to release a new version.

Expand All @@ -173,10 +173,10 @@ If all accesses are available, build all the necessary packages, and then run th

```sh
yarn build:packages
yarn lerna publish 2.0.0-alpha.41 --dist-tag next --exact
yarn lerna publish 2.0.0-alpha.68 --exact
```

**Note**: The v1 packages will also be modified because it's part of the monorepo. It is not ideal but we will live with it for now.\_
~~**Note**: The v1 packages will also be modified because it's part of the monorepo. It is not ideal but we will live with it for now.~~

This command does a few things:

Expand Down Expand Up @@ -233,6 +233,12 @@ https://github.com/facebook/docusaurus/releases/tag/%VER%

## Docusaurus 1

### IMPORTANT: v1 packages are now private:

**TLDR**: you need to mark them as public, publish, and mark them back as private

v1 packages have been marked as `private: true` on purpose. This is because lerna will publish ALL (v1+v2) packages with the lerna-publish command. Unfortunately it seems therre is no way to tell it to ignore v1 packages while publishing v2. During a long time, we published all these packages using the @next dist tag: `yarn lerna publish 2.0.0-alpha.41 --dist-tag next --exact` But it cause problems because v2 packages will then all need @next during npm/yarn installs, confusing some users (https://github.com/facebook/docusaurus/issues/3755) We made the v1 packages private so that lerna publish won't publish them, so that we can publish v2 packages under latest dist tag, without creating v1 upgrades that people will be notified abut.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great explanation 👍
Can we mark new versions with two tags, latest and next? It seems that they did it before.

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks.

Actually I think it's a mistale, and it's one single badly named tag 😓

I'm actually removing all the next tags so that the @Docusaurus packages are all on latest

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep a reference somewhere, I removed the v2 tags with the following command:

yarn lerna exec --no-private 'yarn tag remove $LERNA_PACKAGE_NAME next,latest'
yarn lerna exec --no-private 'yarn tag remove $LERNA_PACKAGE_NAME next'

The --no-private ensure that v1 packages are not untagged (because they are now private)


### Updated v1 release process

Process reworked by @slorber at `1.14.6`, it may not be perfect yet:
Expand All @@ -247,7 +253,9 @@ Suppose we are at `v1.14.5`, and want to release `v1.14.6`:
- Run `yarn install`
- Version the docs: `yarn workspace docusaurus-1-website docusaurus-version 1.14.6`
- Test the v1 website locally: `yarn start:v1` + `yarn build:v1`
- Make the v1 package private: false
- Publish: `yarn workspace docusaurus publish --new-version 1.14.6`
- Make the v1 package private: true

The release is now published. It's worth to test it by initializing a new v1 site:

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,5 +1,5 @@
{
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"npmClient": "yarn",
"useWorkspaces": true,
"changelog": {
Expand Down
4 changes: 3 additions & 1 deletion packages/docusaurus-1.x/package.json
@@ -1,7 +1,9 @@
{
"name": "docusaurus",
"description": "Easy to Maintain Open Source Documentation Websites",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"private_comment": "MADE PRIVATE ON PURPOSE! READ V1 PUBLISH GUIDE",
"private": true,
"license": "MIT",
"keywords": [
"documentation",
Expand Down
9 changes: 6 additions & 3 deletions packages/docusaurus-cssnano-preset/package.json
@@ -1,19 +1,22 @@
{
"name": "@docusaurus/cssnano-preset",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Advanced cssnano preset for maximum optimization",
"main": "index.js",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/facebook/docusaurus.git",
"directory": "packages/docusaurus-cssnano-preset"
},
"dependencies": {
"cssnano-preset-advanced": "^4.0.7",
"postcss": "^7.0.2",
"postcss-combine-duplicated-selectors": "^9.1.0",
"postcss-sort-media-queries": "^1.7.26",
"cssnano-preset-advanced": "^4.0.7"
"postcss-sort-media-queries": "^1.7.26"
},
"devDependencies": {
"to-vfile": "^6.0.0"
Expand Down
4 changes: 3 additions & 1 deletion packages/docusaurus-init-1.x/package.json
@@ -1,7 +1,9 @@
{
"name": "docusaurus-init",
"description": "Initialization script for Docusaurus",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"private_comment": "MADE PRIVATE ON PURPOSE! READ V1 PUBLISH GUIDE",
"private": true,
"license": "MIT",
"preferGlobal": true,
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-init/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/init",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Create Docusaurus app easily",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-init/templates/bootstrap/package.json
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-bootstrap-template",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -11,8 +11,8 @@
"serve": "docusaurus serve"
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/preset-bootstrap": "2.0.0-alpha.66",
"@docusaurus/core": "2.0.0-alpha.68",
"@docusaurus/preset-bootstrap": "2.0.0-alpha.68",
"@mdx-js/react": "^1.5.8",
"classnames": "^2.2.6",
"react": "^16.8.4",
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-init/templates/classic/package.json
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-classic-template",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -12,8 +12,8 @@
"clear": "docusaurus clear"
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/preset-classic": "2.0.0-alpha.66",
"@docusaurus/core": "2.0.0-alpha.68",
"@docusaurus/preset-classic": "2.0.0-alpha.68",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"react": "^16.8.4",
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-init/templates/facebook/package.json
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-facebook-template",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -16,8 +16,8 @@
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.{js,md}\""
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/preset-classic": "2.0.0-alpha.66",
"@docusaurus/core": "2.0.0-alpha.68",
"@docusaurus/preset-classic": "2.0.0-alpha.68",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"react": "^16.8.4",
Expand Down
8 changes: 4 additions & 4 deletions packages/docusaurus-mdx-loader/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/mdx-loader",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Docusaurus Loader for MDX",
"main": "src/index.js",
"publishConfig": {
Expand All @@ -18,8 +18,8 @@
"dependencies": {
"@babel/parser": "^7.12.5",
"@babel/traverse": "^7.12.5",
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/utils": "2.0.0-alpha.66",
"@docusaurus/core": "2.0.0-alpha.68",
"@docusaurus/utils": "2.0.0-alpha.68",
"@mdx-js/mdx": "^1.6.21",
"@mdx-js/react": "^1.6.21",
"escape-html": "^1.0.3",
Expand All @@ -36,7 +36,7 @@
"webpack": "^4.44.1"
},
"devDependencies": {
"@docusaurus/types": "2.0.0-alpha.66",
"@docusaurus/types": "2.0.0-alpha.68",
"remark": "^12.0.0",
"remark-mdx": "^1.6.21",
"to-vfile": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-migrate/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/migrate",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "A cli tool to migrate between different version of docusuarus",
"main": "lib/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-module-type-aliases/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/module-type-aliases",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Docusaurus module type aliases",
"types": "./src/index.d.ts",
"publishConfig": {
Expand Down
10 changes: 5 additions & 5 deletions packages/docusaurus-plugin-client-redirects/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-client-redirects",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Client redirects plugin for Docusaurus",
"main": "lib/index.js",
"scripts": {
Expand All @@ -17,10 +17,10 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/types": "2.0.0-alpha.66",
"@docusaurus/utils": "2.0.0-alpha.66",
"@docusaurus/utils-validation": "2.0.0-alpha.66",
"@docusaurus/core": "2.0.0-alpha.68",
"@docusaurus/types": "2.0.0-alpha.68",
"@docusaurus/utils": "2.0.0-alpha.68",
"@docusaurus/utils-validation": "2.0.0-alpha.68",
"chalk": "^3.0.0",
"eta": "^1.11.0",
"fs-extra": "^8.1.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/docusaurus-plugin-content-blog/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-content-blog",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Blog plugin for Docusaurus",
"main": "lib/index.js",
"types": "index.d.ts",
Expand All @@ -18,11 +18,11 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/mdx-loader": "2.0.0-alpha.66",
"@docusaurus/types": "2.0.0-alpha.66",
"@docusaurus/utils": "2.0.0-alpha.66",
"@docusaurus/utils-validation": "2.0.0-alpha.66",
"@docusaurus/core": "2.0.0-alpha.68",
"@docusaurus/mdx-loader": "2.0.0-alpha.68",
"@docusaurus/types": "2.0.0-alpha.68",
"@docusaurus/utils": "2.0.0-alpha.68",
"@docusaurus/utils-validation": "2.0.0-alpha.68",
"chalk": "^3.0.0",
"feed": "^4.2.1",
"fs-extra": "^8.1.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/docusaurus-plugin-content-docs/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-content-docs",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Docs content plugin for Docusaurus",
"main": "lib/index.js",
"types": "src/plugin-content-docs.d.ts",
Expand All @@ -18,17 +18,17 @@
},
"license": "MIT",
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-alpha.66",
"@docusaurus/module-type-aliases": "2.0.0-alpha.68",
"@types/picomatch": "^2.2.1",
"commander": "^5.0.0",
"picomatch": "^2.1.1"
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/mdx-loader": "2.0.0-alpha.66",
"@docusaurus/types": "2.0.0-alpha.66",
"@docusaurus/utils": "2.0.0-alpha.66",
"@docusaurus/utils-validation": "2.0.0-alpha.66",
"@docusaurus/core": "2.0.0-alpha.68",
"@docusaurus/mdx-loader": "2.0.0-alpha.68",
"@docusaurus/types": "2.0.0-alpha.68",
"@docusaurus/utils": "2.0.0-alpha.68",
"@docusaurus/utils-validation": "2.0.0-alpha.68",
"chalk": "^3.0.0",
"execa": "^3.4.0",
"fs-extra": "^8.1.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/docusaurus-plugin-content-pages/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-content-pages",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Pages content plugin for Docusaurus",
"main": "lib/index.js",
"types": "src/plugin-content-pages.d.ts",
Expand All @@ -18,13 +18,13 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/mdx-loader": "2.0.0-alpha.66",
"@docusaurus/types": "2.0.0-alpha.66",
"@docusaurus/utils": "2.0.0-alpha.66",
"@docusaurus/utils-validation": "2.0.0-alpha.66",
"joi": "^17.2.1",
"@docusaurus/core": "2.0.0-alpha.68",
"@docusaurus/mdx-loader": "2.0.0-alpha.68",
"@docusaurus/types": "2.0.0-alpha.68",
"@docusaurus/utils": "2.0.0-alpha.68",
"@docusaurus/utils-validation": "2.0.0-alpha.68",
"globby": "^10.0.1",
"joi": "^17.2.1",
"loader-utils": "^1.2.3",
"minimatch": "^3.0.4",
"remark-admonitions": "^1.2.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/docusaurus-plugin-debug/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-debug",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Debug plugin for Docusaurus",
"main": "lib/index.js",
"scripts": {
Expand All @@ -17,9 +17,9 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/types": "2.0.0-alpha.66",
"@docusaurus/utils": "2.0.0-alpha.66",
"@docusaurus/core": "2.0.0-alpha.68",
"@docusaurus/types": "2.0.0-alpha.68",
"@docusaurus/utils": "2.0.0-alpha.68",
"react-json-view": "^1.19.1"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-google-analytics/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-google-analytics",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Global analytics (analytics.js) plugin for Docusaurus",
"main": "src/index.js",
"publishConfig": {
Expand All @@ -13,7 +13,7 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66"
"@docusaurus/core": "2.0.0-alpha.68"
},
"peerDependencies": {
"react": "^16.8.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-google-gtag/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-google-gtag",
"version": "2.0.0-alpha.66",
"version": "2.0.0-alpha.68",
"description": "Global Site Tag (gtag.js) plugin for Docusaurus",
"main": "src/index.js",
"publishConfig": {
Expand All @@ -13,7 +13,7 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.66"
"@docusaurus/core": "2.0.0-alpha.68"
},
"peerDependencies": {
"react": "^16.8.4",
Expand Down