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(gatsby): compile only TS files #34892

Merged
merged 1 commit into from
Feb 22, 2022
Merged

chore(gatsby): compile only TS files #34892

merged 1 commit into from
Feb 22, 2022

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Feb 21, 2022

Description

Adjust #34776 to only compile .ts files

Related Issues

[sc-46563]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 21, 2022
const parcel = constructParcel(siteRoot)
const distDir = `${siteRoot}/${COMPILED_CACHE_DIR}`
await ensureDir(distDir)
await emptyDir(distDir)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of importance - added emptyDir to clean out potentially stale files in compiled dir from previous compilations

@pieh pieh added topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Feb 21, 2022
@pieh pieh changed the title compile just .ts files and leave .js as-is only compile TS files Feb 21, 2022
export const gatsbyFileRegex = `gatsby-+(node|config).{ts,js}`
export const gatsbyFileRegex = `gatsby-+(node|config).ts`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverting this line should automagically enable handling compiled .js files

@pieh pieh changed the title only compile TS files chore(gatsby): compile only TS files Feb 22, 2022
@pieh pieh marked this pull request as ready for review February 22, 2022 10:00
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@pieh pieh merged commit ac9b651 into feat/ts-aot Feb 22, 2022
@pieh pieh deleted the feat/ts-aot-just-ts branch February 22, 2022 11:21
gatsbybot pushed a commit that referenced this pull request Feb 28, 2022
* get simplest gatsby-config.ts working

* make gatsby-node work

* use program.directory for default-site-plugin for browser/ssr

* chore(docs): update TS doc (#34757)

Co-authored-by: LekoArts <lekoarts@gmail.com>

* feat(gatsby-parcel-config): create parcel config package (#34779)

Co-authored-by: Lennart <lekoarts@gmail.com>

* refactor(core): Polish ahead of time ts implementation (#34773)

Co-authored-by: LekoArts <lekoarts@gmail.com>

* tmp

* update parcel deps version

* update snapshot

* merge master

* feat(core): TS compilation of local plugin gatsby files (#34827)

Co-authored-by: LekoArts <lekoarts@gmail.com>

* Update scaling-issues.md

* Restore build.js

* Restore develop.js

* Restore repl.js

* set flag to always true

* chore(docs): update main tutorial to incorporate TS Updates to create-gatsby (#34890)

Co-authored-by: Lennart <lekoarts@gmail.com>

* chore(gatsby): compile only TS files (#34892)

* use require resolve for defaultConfig

* update doc to add limitations and migration guides

* add structured error logging

* fix cache reslience setup (#34915)

* bump @parcel/source-map in monorepo lock

* adjust tests so cache dirs are cleared only before compilations to workaround EBUSY problems on Windows

* address review comments

* docs: specify gatsby versions supporting particular TS features (#34945)

Co-authored-by: Lennart <lekoarts@gmail.com>

Co-authored-by: Jude Agboola <marvinjudehk@gmail.com>
Co-authored-by: Ty Hopp <tyhopp@users.noreply.github.com>
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
@LekoArts LekoArts added this to the TypeScript Improvements milestone Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants