profile
viewpoint

ltm/boto3 0

AWS SDK for Python

ltm/botocore 0

The low-level, core functionality of boto 3.

ltm/cordova-cli 0

Apache Cordova CLI

ltm/docusaurus 0

Easy to maintain open source documentation websites.

ltm/hvac 0

:lock: Python 2/3 client for HashiCorp Vault

ltm/icloud_photos_downloader 0

A command-line tool to download photos from iCloud

ltm/ionic-conference-app 0

A conference app built with Ionic to demonstrate Ionic

Pull request review commentionic-team/stencil

test(message-utils): add message-utils testing

 export const catchError = (diagnostics: d.Diagnostic[], err: Error | null | unde   };    if (isString(msg)) {-    diagnostic.messageText = msg;+    diagnostic.messageText = msg.length ? msg : 'UNKNOWN ERROR';   } else if (err != null) {     if (err.stack != null) {       diagnostic.messageText = err.stack.toString();     } else {       if (err.message != null) {-        diagnostic.messageText = err.message.toString();+        diagnostic.messageText = err.message.length ? err.message.toString() : 'UNKNOWN ERROR';

Presumably it's safe to remove toString() since err.message is a string?

        diagnostic.messageText = err.message.length ? err.message : 'UNKNOWN ERROR';
rwaskiewicz

comment created time in 12 hours

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentionic-team/stencil

chore(typescript): enable useUnknownInCatchVariables in core

 export const createCustomResolverSync = (       const fsFilePath = normalizeFsPath(p);       try {         return sys.realpathSync(fsFilePath);

Unrelated to your changes... does this even throw an exception? According to the interface of sys.realpathSync() it returns a CompilerSystemRealpathResults and doesn't throw an exception: https://github.com/ionic-team/stencil/blob/b00585fb643332eb9b1c188e8e23a8e8a4ec742d/src/declarations/stencil-public-compiler.ts#L1032-L1035

rwaskiewicz

comment created time in 13 hours

PullRequestReviewEvent

Pull request review commentionic-team/stencil

chore(typescript): enable useUnknownInCatchVariables in core

 export const createCustomResolverSync = (       const fsFilePath = normalizeFsPath(p);       try {         return sys.realpathSync(fsFilePath);-      } catch (realpathErr) {-        if (realpathErr.code !== 'ENOENT') {-          throw realpathErr;+      } catch (realpathErr: unknown) {+        if (realpathErr instanceof Object && 'code' in realpathErr) {+          // @ts-ignore: we've determined 'code' is in the prototype chain, but TS isn't happy about the access

FYI: This is because in isn't a type guard: microsoft/TypeScript#21732. One option would be to implement a type guard function for NodeJS.ErrnoException:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L183-L188

rwaskiewicz

comment created time in 13 hours

PullRequestReviewEvent

Pull request review commentionic-team/stencil

chore(release): add otp to next tag creation

 export function runReleaseTasks(opts: BuildOptions, args: ReadonlyArray<string>)         title: 'Also set "next" npm tag on @stencil/core',         task: () => {           const cmd = 'npm';-          const cmdArgs = ['dist-tag', 'add', '@stencil/core@' + opts.version, 'next'];+          const cmdArgs = ['dist-tag', 'add', '--otp', '@stencil/core@' + opts.version, 'next'];

I think the OTP code must be provided on the command line, i.e. --otp <one-time password>, per the docs.

rwaskiewicz

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

push eventionic-team/ionic-site

Lars Mikkelsen

commit sha b4eb0ed9cdd8905df5f50b8fb2e109055aa7576e

Exclude app wizard from Bizible

view details

push time in 12 days

issue openedfacebook/docusaurus

Canonical tag contains duplicated base URL when trailingSlash is false

Have you read the Contributing Guidelines on issues?

Prerequisites

  • [X] I'm using the latest version of Docusaurus.
  • [ ] I have tried the npm run clear or yarn clear command.
  • [ ] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • [ ] I have tried creating a repro with https://new.docusaurus.io.
  • [ ] I have read the console error message carefully (if applicable).

Description

If baseUrl is set to value other than '/' (e.g. '/docusaurus-canonical/') and trailingSlash is set to false, the canonical tag of the main index page will contain a duplicated base URL. Note that this only applies to the canonical tag set by JavaScript and not the static HTML.

I suspect this is caused by the shouldAddBaseUrl check in addBaseUrl(): https://github.com/facebook/docusaurus/blob/a2d2324ca71275f75ec5b9cde88fb10dfff26b44/packages/docusaurus/src/client/exports/useBaseUrl.ts#L37

Assuming baseUrl is '/docusaurus-canonical/' the URL of the main index page is '/docusaurus-canonical', so url does not start with baseUrl.

Steps to reproduce

  1. Set baseUrl to a value other than '/', e.g. '/docusaurus-canonical/'
  2. Set trailingSlash to false
  3. Serve the site from a web host that doesn't use trailing slashes (e.g. Vercel with trailingSlash=false)
  4. Open the main index page in a browser

Expected behavior

The canonical tag should contain the correct URL of the page, i.e. ${siteUrl}/docusaurus-canonical.

Actual behavior

The canonical tag contains a duplicated base URL, i.e. ${siteUrl}/docusaurus-canonical/docusaurus-canonical: Screen Shot 2022-01-11 at 12 39 13 PM

Your environment

  • Public source code: https://github.com/ltm/docusaurus-canonical
  • Public site URL: https://docusaurus-canonical.vercel.app/docusaurus-canonical
  • Docusaurus version used: 2.0.0-beta.14
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Firefox 95
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS 12.1

Reproducible demo

https://github.com/ltm/docusaurus-canonical

Self-service

  • [ ] I'd be willing to fix this bug myself.

created time in 14 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha 1add83400a0b91272c978cba683361e394360b3c

Initial commit

view details

push time in 14 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha 0b3c296445fc75c59be04fc1972e61ec5c381a87

Initial commit

view details

push time in 14 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha 3a7a86065c5c1e789ce90a02286eb8e5269a4d2d

Initial commit

view details

push time in 14 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha bd980978d134b71d2325c34f3caa5814a4a82cee

Initial commit

view details

push time in 14 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha 4fcef839b995f7b27f24c2f466bdf548790d1968

Initial commit

view details

push time in 14 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha 32ef2ff89e121b8830e7a235d74a541124a4872c

Initial commit

view details

push time in 14 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha 2c832eabe9b189f779135c0b9fdf5b046ef0d12f

Initial commit

view details

push time in 14 days

delete branch ltm/docusaurus-canonical

delete branch : gh-pages

delete time in 15 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha d979622ed9e6cbe80faa7a698563772f2b52d0cc

Initial commit

view details

push time in 15 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha 05f8659f574eefe98c18c397a001fa15584ec11e

Deploy website - based on f35424e28cf9ba592600f592307127625050921a

view details

push time in 15 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha f35424e28cf9ba592600f592307127625050921a

Initial commit

view details

push time in 15 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha 9cc83eceac8d45f93fc6ec8a3addc3f2ba646c7d

Initial commit

view details

push time in 15 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha 0ff058a942595a5a1db1de4ac30940ad89c88f07

Initial commit

view details

push time in 15 days

push eventltm/docusaurus-canonical

Lars Mikkelsen

commit sha c6b9fd3009e6672bbf5354539d08ef18fddcaf0c

Initial commit

view details

push time in 15 days

more