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

Update/next 12.3 #42

Merged
merged 13 commits into from
Sep 20, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fair-rockets-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'pliny': patch
---

export modules from root and use only named exports
7 changes: 7 additions & 0 deletions .changeset/nine-impalas-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@pliny/cli': patch
'@pliny/installer': patch
'pliny': patch
---

update dependencies
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ package-lock.json
build
dist
.rpt2_cache
packages/pliny/analytics
packages/pliny/comments
packages/pliny/config
packages/pliny/mdx-components
packages/pliny/mdx-plugins
packages/pliny/newsletter
packages/pliny/search
packages/pliny/seo
packages/pliny/ui
packages/pliny/utils
packages/pliny/chunk-*

# misc
.DS_Store
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@
]
},
"devDependencies": {
"@changesets/cli": "^2.22.0",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^8.0.0",
"@types/webpack": "^4.41.26",
"@changesets/cli": "^2.24.0",
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.1.0",
"husky": "^8.0.0",
"lint-staged": "^11.0.0",
"prettier": "^2.2.1",
"turbo": "1.2.9",
"lint-staged": "^13.0.0",
"prettier": "^2.7.0",
"turbo": "1.4.6",
"vitest": "0.12.6"
},
"workspaces": {
Expand Down
20 changes: 10 additions & 10 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@
"/oclif.manifest.json"
],
"dependencies": {
"@oclif/core": "1.9.0",
"@oclif/core": "1.16.1",
"@oclif/plugin-autocomplete": "1.3.0",
"@oclif/plugin-help": "5.1.12",
"@oclif/plugin-not-found": "2.3.1",
"@oclif/plugin-plugins": "2.1.0",
"@oclif/plugin-version": "1.0.4",
"@oclif/plugin-version": "1.1.2",
"@pliny/installer": "^0.0.3",
"camelcase": "^6.2.0",
"chalk": "^4.1.0",
"console-table-printer": "^2.7.5",
"console-table-printer": "^2.11.1",
"cross-spawn": "7.0.3",
"dotenv-expand": "^5.1.0",
"enquirer": "2.3.6",
"esm": "3.2.25",
"find-up": "5.0.0",
"fs-extra": "^9.1.0",
"fs-extra": "^10.1.0",
"global-agent": "2.2.0",
"got": "^11.8.1",
"has-yarn": "2.1.0",
Expand All @@ -47,17 +47,17 @@
"rimraf": "^3.0.2",
"semver": "7.3.4",
"tar": "^6.1.11",
"ts-node": "10.8.0",
"tsconfig-paths": "3.9.0",
"tslog": "^3.1.1",
"ts-node": "10.9.1",
"tsconfig-paths": "4.1.0",
"tslog": "^3.3.4",
"v8-compile-cache": "2.3.0"
},
"devDependencies": {
"nock": "13.0.6",
"oclif": "^3",
"oclif": "3.2.1",
"stdout-stderr": "0.1.13",
"tsup": "6.1.2",
"typescript": "^4.6.2"
"tsup": "6.2.3",
"typescript": "^4.8.3"
},
"oclif": {
"commands": "./dist/commands",
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/test/commands/new.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ describe('`new` command', () => {
'pages/_app.tsx',
'tsconfig.json',
'next-env.d.ts',
'.eslintrc.json',
'node_modules/next',
'.eslintrc.js',
'.gitignore',
]

Expand Down
3 changes: 1 addition & 2 deletions packages/config/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ module.exports = {
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars-experimental': ['warn'],
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-use-before-define': ['error', { variables: false, functions: false }],
'space-before-function-paren': 0,
'no-plusplus': 0,
Expand Down
14 changes: 7 additions & 7 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"license": "MIT",
"private": true,
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.28.1",
"eslint": "^7.29.0",
"eslint-config-next": "12.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.3.1",
"typescript": "^4.6.2"
"@typescript-eslint/eslint-plugin": "^5.36.2",
"eslint": "^8.23.0",
"eslint-config-next": "12.3.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"typescript": "^4.8.3"
}
}
16 changes: 8 additions & 8 deletions packages/installer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
"url": "git+https://github.com/timlrx/pliny.git"
},
"dependencies": {
"@babel/core": "7.18.0",
"@babel/plugin-transform-typescript": "7.18.1",
"@babel/core": "7.19.0",
"@babel/plugin-transform-typescript": "7.19.0",
"@types/jscodeshift": "0.11.5",
"ast-types": "0.14.2",
"console-table-printer": "^2.7.5",
"cross-spawn": "7.0.3",
"diff": "5.0.0",
"enquirer": "2.3.6",
"execa": "6.1.0",
"fs-extra": "^9.1.0",
"fs-extra": "^10.1.0",
"globby": "11.0.2",
"ink": "3.2.0",
"ink-spinner": "4.0.3",
Expand All @@ -42,15 +42,15 @@
"ora": "5.4.1",
"pluralize": "^8.0.0",
"react": "17.0.2",
"recast": "0.20.5",
"recast": "0.21.2",
"rimraf": "^3.0.2",
"tslog": "^3.1.1",
"tslog": "^3.3.4",
"vinyl": "2.2.1"
},
"devDependencies": {
"contentlayer": "0.2.5",
"tsup": "6.1.2",
"typescript": "^4.6.2"
"contentlayer": "0.2.8",
"tsup": "6.2.3",
"typescript": "^4.8.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/installer/test/executors/executor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Executor', () => {
it('should render Frontmatter', () => {
const { lastFrame } = render(<Frontmatter executor={executorConfig} />)

expect(stripAnsi(lastFrame())).toMatchSnapshot()
expect(stripAnsi(lastFrame() as string)).toMatchSnapshot()
})

it('should contain a step name and explanation', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
import { expect, describe, it } from 'vitest'
import { render } from 'ink-testing-library'
import React from 'react'
Expand All @@ -15,20 +16,20 @@ describe('Executor', () => {
it('should render PrintMessageExecutor', () => {
const { lastFrame } = render(
<PrintMessageExecutor
cliArgs={null}
cliArgs={{}}
cliFlags={{ yesToAll: false }}
onChangeCommitted={() => {}}
step={executorConfig}
/>
)

expect(stripAnsi(lastFrame())).toMatchSnapshot()
expect(stripAnsi(lastFrame() as string)).toMatchSnapshot()
})

it('should contain a step name and explanation', () => {
const { frames } = render(
<PrintMessageExecutor
cliArgs={null}
cliArgs={{}}
cliFlags={{ yesToAll: false }}
onChangeCommitted={() => {}}
step={executorConfig}
Expand Down
File renamed without changes.
102 changes: 23 additions & 79 deletions packages/pliny/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,104 +3,48 @@
"description": "Main entry point for pliny components and CLI",
"homepage": "https://github.com/timlrx/pliny",
"version": "0.0.5",
"main": "./dist/index.mjs",
"type": "module",
"exports": {
"./analytics": "./dist/analytics/index.mjs",
"./analytics/": "./dist/analytics/",
"./comments": "./dist/comments/index.mjs",
"./comments/": "./dist/comments/",
"./search": "./dist/search/index.mjs",
"./search/": "./dist/search/",
"./config": "./dist/config/index.mjs",
"./mdx-components": "./dist/mdx-components/index.mjs",
"./mdx-plugins": "./dist/mdx-plugins/index.mjs",
"./mdx-plugins/": "./dist/mdx-plugins/",
"./newsletter": "./dist/newsletter/index.mjs",
"./newsletter/": "./dist/newsletter/",
"./seo": "./dist/seo/index.mjs",
"./ui/": "./dist/ui/",
"./utils/": "./dist/utils/"
"./analytics": "./analytics/index.js",
"./comments": "./comments/index.js",
"./search": "./search/index.js",
"./config": "./config/index.js",
"./mdx-components": "./mdx-components/index.js",
"./mdx-plugins": "./mdx-plugins/index.js",
"./newsletter": "./newsletter/index.js",
"./seo": "./seo/index.js",
"./ui/*": "./ui/*",
"./utils/*": "./utils/*"
},
"source": "src/index.js",
"files": [
"/bin",
"/dist/**"
"**"
],
"typesVersions": {
"*": {
"analytics": [
"dist/analytics"
],
"analytics/*": [
"dist/analytics/*"
],
"comments": [
"dist/comments"
],
"comments/*": [
"dist/comments/*"
],
"search": [
"dist/search"
],
"search/*": [
"dist/search/*"
],
"config": [
"dist/config"
],
"mdx-components": [
"dist/mdx-components"
],
"mdx-plugins": [
"dist/mdx-plugins"
],
"mdx-plugins/*": [
"dist/mdx-plugins/*"
],
"newsletter": [
"dist/newsletter"
],
"newsletter/*": [
"dist/newsletter/*"
],
"seo": [
"dist/seo"
],
"ui/*": [
"dist/ui/*"
],
"utils/*": [
"dist/utils/*"
]
}
},
"scripts": {
"dev": "tsup-node src/**/* --watch --inject ./react-import.js --format esm --dts --silent",
"build": "rimraf dist && tsup-node src/**/* --inject ./react-import.js --format esm --dts --silent"
"dev": "tsup-node src/**/* --watch --inject ./react-import.js --format esm --splitting --treeshake --dts --silent && cp -fR dist/* && rimraf dist",
"build": "rimraf dist && tsup-node src/**/* --inject ./react-import.js --format esm --splitting --treeshake --dts --silent && cp -fR dist/* ./ && rimraf dist"
},
"author": "Timothy Lin <timothy0336@hotmail.com> (https://timlrx.com)",
"dependencies": {
"@docsearch/react": "^3.1.0",
"contentlayer": "0.2.5",
"github-slugger": "^1.3.0",
"@docsearch/react": "^3.2.0",
"contentlayer": "0.2.8",
"github-slugger": "^1.4.0",
"image-size": "1.0.0",
"js-yaml": "4.1.0",
"kbar": "0.1.0-beta.36",
"next-contentlayer": "0.2.5",
"next-contentlayer": "0.2.8",
"remark": "^14.0.2",
"unist-util-visit": "^4.0.0"
"unist-util-visit": "^4.1.0"
},
"peerDependencies": {
"next": ">=12.0.0",
"react": "17.0.2",
"react-dom": "17.0.2"
"react": "^17.0.2 || ^18.0.0",
"react-dom": "^17.0.2 || ^18.0.0"
},
"devDependencies": {
"@mailchimp/mailchimp_marketing": "^3.0.75",
"rimraf": "^3.0.2",
"tsup": "6.1.2",
"typescript": "^4.6.2"
"tsup": "6.2.3",
"typescript": "^4.8.3"
},
"lint-staged": {
"*.+(js|jsx|ts|tsx)": [
Expand Down
4 changes: 1 addition & 3 deletions packages/pliny/src/analytics/GoogleAnalytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface GoogleAnalyticsProps {
googleAnalyticsId: string
}

const GoogleAnalytics = ({ googleAnalyticsId }: GoogleAnalyticsProps) => {
export const GA = ({ googleAnalyticsId }: GoogleAnalyticsProps) => {
return (
<>
<Script
Expand All @@ -26,8 +26,6 @@ const GoogleAnalytics = ({ googleAnalyticsId }: GoogleAnalyticsProps) => {
)
}

export default GoogleAnalytics

// https://developers.google.com/analytics/devguides/collection/gtagjs/events
export const logEvent = (action, category, label, value) => {
window.gtag?.('event', action, {
Expand Down
4 changes: 1 addition & 3 deletions packages/pliny/src/analytics/Plausible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface PlausibleProps {
plausibleDataDomain: string
}

const Plausible = ({ plausibleDataDomain }: PlausibleProps) => {
export const Plausible = ({ plausibleDataDomain }: PlausibleProps) => {
return (
<>
<Script
Expand All @@ -21,8 +21,6 @@ const Plausible = ({ plausibleDataDomain }: PlausibleProps) => {
)
}

export default Plausible

// https://plausible.io/docs/custom-event-goals
export const logEvent = (eventName, ...rest) => {
return window.plausible?.(eventName, ...rest)
Expand Down
Loading