Skip to content

fix: change defaults for mangle and headerIds to false#2890

Merged
UziTech merged 1 commit intomarkedjs:masterfrom
UziTech:change-defaults
Aug 6, 2023
Merged

fix: change defaults for mangle and headerIds to false#2890
UziTech merged 1 commit intomarkedjs:masterfrom
UziTech:change-defaults

Conversation

@UziTech
Copy link
Copy Markdown
Member

@UziTech UziTech commented Jul 29, 2023

Description

Change default for mangle and headerIds to false

This will prevent console logs by default.

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

@vercel
Copy link
Copy Markdown

vercel bot commented Jul 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marked-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2023 6:36am

@UziTech
Copy link
Copy Markdown
Member Author

UziTech commented Aug 6, 2023

@calculuschild any issue with merging this?

Copy link
Copy Markdown
Contributor

@calculuschild calculuschild left a comment

Choose a reason for hiding this comment

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

I have no problems with this.

@UziTech UziTech changed the title BREAKING CHANGE: change defaults for mangle and headerIds fix: change defaults for mangle and headerIds to false Aug 6, 2023
@UziTech UziTech merged commit 63a839b into markedjs:master Aug 6, 2023
@UziTech UziTech deleted the change-defaults branch August 6, 2023 23:48
github-actions bot pushed a commit that referenced this pull request Aug 6, 2023
# [7.0.0](v6.0.0...v7.0.0) (2023-08-06)

### Bug Fixes

* change defaults for mangle and headerIds to false ([#2890](#2890)) ([63a839b](63a839b))

### BREAKING CHANGES

* change defaults for mangle and headerIds to false
github-merge-queue bot pushed a commit to microsoft/qdk that referenced this pull request Oct 27, 2023
Updated all direct npm dependencies to `@latest`.

Observed changes:
- Prettier: now adds trailing commas to all lists.
prettier/prettier#11479
- Katas: `marked` now omits `id` attributes for header tags (confirmed
benign) markedjs/marked#2890
- Other trivial differences in JS emit through `esbuild`.

I was really hoping this would be a trivial process, but sadly it
wasn't. For posterity, here's what the process ended up being:

```js
const { execSync } = require("node:child_process");

function run(command) {
  console.log(`running command ${command}`);
  return execSync(command);
}

const deps = JSON.parse(run(`npm ls --package-lock-only --json`));

// Do these in this order first, otherwise @typescript-eslint/eslint-plugin
// gets really upset about the peer dependency missing
run("npm install @typescript-eslint/parser@latest");
run("npm install @typescript-eslint/eslint-plugin@latest");

// Update all direct deps to @latest
for (const depName of Object.keys(deps.dependencies)) {
  if (!depName.startsWith("qsharp")) {
    run(`npm install ${depName}@latest`);
  }
}

// Update indirect deps in package-lock.json
run("npm update");

// This fixes the workspace names in package-lock.json,
// which for some reason get erased above
run("npm install");

```

Ran `./build.py` to confirm the repo still built, discovered formatting
changes.

To reformat with new Prettier defaults:

```bash
npm run prettier:fix
```

Since we pulled a lot of JS tooling updates, I ran a quick script to
save the built artifacts so I could diff the JS output:

```bash
#!/bin/bash

set -e

# clean repo
git clean -fdx
rm -rf baseline-compare/
mkdir baseline-compare

# build
./build.py --wasm --npm --vscode --no-check --no-test

# npm
mkdir -p baseline-compare/npm
pushd npm
npm pack --pack-destination .
popd
tar -xzf npm/qsharp-lang-0.0.0.tgz -C baseline-compare/npm

# vsix
npm install -g @vscode/vsce
pushd vscode
vsce package --pre-release
popd
unzip vscode/qsharp-lang-vscode-dev-0.0.0.vsix -d baseline-compare/vscode

# commit baseline
cp package-lock.json baseline-compare/
git add baseline-compare/
git commit -m "Baseline for $(git rev-parse HEAD)"
```

Ran this script first on `main`, then with the updated `package.json` &
`package-lock.json`. Used `git` to diff the `baseline-compare` changes.
Confirmed they looked harmless.
Logiclayer1111 pushed a commit to Logiclayer1111/marked that referenced this pull request Apr 20, 2026
# [7.0.0](markedjs/marked@v6.0.0...v7.0.0) (2023-08-06)

### Bug Fixes

* change defaults for mangle and headerIds to false ([#2890](markedjs/marked#2890)) ([14a718b](markedjs/marked@14a718b))

### BREAKING CHANGES

* change defaults for mangle and headerIds to false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Erroneous warnings about deprecated options when using parse()

3 participants