Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/types/node-17.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeSheard authored Jan 14, 2022
2 parents ce35638 + f6f4713 commit 322aca1
Show file tree
Hide file tree
Showing 32 changed files with 1,815 additions and 851 deletions.
6 changes: 6 additions & 0 deletions .changeset/clever-dryers-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'modular-scripts': minor
'modular-views.macro': minor
---

Support yarn v3
5 changes: 5 additions & 0 deletions .changeset/curvy-donkeys-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": patch
---

Bump @rollup/plugin-node-resolve from 13.0.6 to 13.1.3
5 changes: 5 additions & 0 deletions .changeset/loud-kangaroos-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": patch
---

Bump dotenv from 10.0.0 to 11.0.0
5 changes: 5 additions & 0 deletions .changeset/nasty-mayflies-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": minor
---

Add "modular rename" command, which re-writes the name of a package in its package.json and its usages in the other packages.
5 changes: 5 additions & 0 deletions .changeset/perfect-trains-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'modular-scripts': patch
---

Bump browserslist from 4.18.1 to 4.19.1.
5 changes: 5 additions & 0 deletions .changeset/purple-eyes-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": patch
---

Bump rollup from 2.60.2 to 2.63.0
5 changes: 5 additions & 0 deletions .changeset/quick-readers-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": patch
---

Bump resolve from 1.20.0 to 1.21.0
5 changes: 5 additions & 0 deletions .changeset/rare-cycles-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": patch
---

Bump esbuild from 0.14.2 to 0.14.11
5 changes: 5 additions & 0 deletions .changeset/rich-eagles-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": patch
---

Bump @svgr/core from 6.1.1 to 6.1.2
5 changes: 5 additions & 0 deletions .changeset/seven-elephants-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'modular-scripts': patch
---

Bump postcss-preset-env from 7.0.1 to 7.2.3.
5 changes: 5 additions & 0 deletions .changeset/tiny-jobs-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": patch
---

Bump postcss from 8.4.4 to 8.4.5
5 changes: 5 additions & 0 deletions .changeset/violet-geese-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": patch
---

Bump esbuild-loader from 2.16.0 to 2.17.0
5 changes: 5 additions & 0 deletions .changeset/wise-suits-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"modular-scripts": patch
---

Bump babel-preset-react-app from 10.0.0 to 10.0.1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ packages/sample-esbuild-app
packages/sample-view
packages/sample-package
packages/nested
packages/sample-library-package
packages/sample-depending-package

# example app
packages/esbuild-app
Expand Down
2 changes: 0 additions & 2 deletions docs/building-apps/web workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ parent: Building your Apps
title: Adding web workers
---

esbuild {: .label .label-yellow }

It is possible to add
[web workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)
to your application just by writing them as normal typescript modules. There are
Expand Down
25 changes: 25 additions & 0 deletions docs/commands/rename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
parent: Commands
title: modular rename
---

# `modular rename <oldPackageName> <newPackageName>`

Renames oldPackageName to newPackageName by:

1. Re-writing the "name" field in the existing package.json to newPackageName
1. Parsing all the sources in all the depending packages and rewriting the
imports to oldPackageName to import newPackageName

This action is `atomic`: if an error occurs while converting, it will stash any
changes made and bring the repo back to the previous state prior to the attempt.

Please note that the directory containing oldPackageName is _not_ renamed,
because the link between directory name and package name is not unambiguous: for
example, nested or scoped packages created with modular get a nested path that
is not easily unambiguosly invertible. The user will need to rename the
directory if needed.

## Options:

`--verbose`: Shows debug information
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"@testing-library/jest-dom": "5.16.1",
"@testing-library/react": "12.1.2",
"@testing-library/user-event": "13.5.0",
"@types/babel__code-frame": "^7.0.3",
"@types/babel-plugin-macros": "2.8.5",
"@types/babel__code-frame": "^7.0.3",
"@types/cross-spawn": "^6.0.2",
"@types/dedent": "0.7.0",
"@types/express": "^4.17.13",
Expand All @@ -70,16 +70,16 @@
"@types/rimraf": "3.0.2",
"@types/semver": "7.3.9",
"@types/semver-regex": "^3.1.0",
"@types/tmp": "0.2.2",
"@types/tmp": "0.2.3",
"@types/update-notifier": "5.1.0",
"@yarnpkg/lockfile": "^1.1.0",
"commander": "8.2.0",
"esbuild": "0.14.2",
"esbuild": "0.14.11",
"eslint": "7.32.0",
"execa": "5.1.1",
"husky": "7.0.4",
"is-ci": "2.0.0",
"lint-staged": "12.1.2",
"lint-staged": "12.1.7",
"micromatch": "4.0.4",
"patch-package": "^6.4.7",
"pptr-testing-library": "0.7.0",
Expand All @@ -93,7 +93,7 @@
"typescript": "4.4.4"
},
"resolutions": {
"esbuild": "0.14.2",
"esbuild": "0.14.11",
"ua-parser-js": "0.7.28"
},
"jest": {
Expand Down
27 changes: 15 additions & 12 deletions packages/modular-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-commonjs": "21.0.1",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.0.6",
"@svgr/core": "6.1.1",
"@rollup/plugin-node-resolve": "13.1.3",
"@svgr/core": "6.1.2",
"@svgr/webpack": "5.5.0",
"@types/micromatch": "4.0.2",
"@types/semver-regex": "3.1.0",
"address": "1.1.2",
"babel-jest": "26.6.3",
"babel-preset-react-app": "10.0.0",
"browserslist": "4.18.1",
"babel-preset-react-app": "10.0.1",
"browserslist": "4.19.1",
"builtin-modules": "3.2.0",
"case-sensitive-paths-webpack-plugin": "2.4.0",
"chalk": "4.1.2",
Expand All @@ -48,10 +48,10 @@
"css-loader": "4.3.0",
"dedent": "0.7.0",
"detect-port-alt": "1.1.6",
"dotenv": "10.0.0",
"dotenv": "11.0.0",
"dotenv-expand": "5.1.0",
"esbuild": "0.14.2",
"esbuild-loader": "2.16.0",
"esbuild": "0.14.11",
"esbuild-loader": "2.18.0",
"escape-string-regexp": "2.0.0",
"eslint": "7.32.0",
"execa": "5.1.1",
Expand All @@ -75,6 +75,7 @@
"jest-runner-eslint": "1.0.0",
"jest-transform-stub": "2.0.0",
"jest-watch-typeahead": "0.6.5",
"js-yaml": "^4.1.0",
"loader-utils": "2.0.0",
"micromatch": "4.0.4",
"mime": "^3.0.0",
Expand All @@ -85,21 +86,21 @@
"parse5": "6.0.1",
"pkg-up": "3.1.0",
"pnp-webpack-plugin": "1.6.4",
"postcss": "8.4.4",
"postcss": "8.4.5",
"postcss-flexbugs-fixes": "4.2.1",
"postcss-loader": "4.2.0",
"postcss-normalize": "8.0.1",
"postcss-preset-env": "7.0.1",
"postcss-preset-env": "7.2.3",
"postcss-safe-parser": "5.0.2",
"prompts": "2.4.2",
"react-error-overlay": "6.0.9",
"react-error-overlay": "6.0.10",
"react-native-web": "0.17.5",
"react-refresh": "0.8.3",
"recursive-readdir": "2.2.2",
"resolve": "1.20.0",
"resolve": "1.21.0",
"resolve-url-loader": "5.0.0-beta.1",
"rimraf": "3.0.2",
"rollup": "2.60.2",
"rollup": "2.63.0",
"rollup-plugin-postcss": "4.0.2",
"rollup-plugin-preserve-shebangs": "0.2.0",
"sass-loader": "10.0.5",
Expand All @@ -112,6 +113,7 @@
"terser-webpack-plugin": "4.2.3",
"tmp": "^0.2.1",
"ts-jest": "26.5.6",
"ts-morph": "^11.0.3",
"update-notifier": "5.1.0",
"url-loader": "4.1.1",
"webpack": "4.46.0",
Expand All @@ -137,6 +139,7 @@
"devDependencies": {
"@schemastore/package": "0.0.6",
"@schemastore/tsconfig": "0.0.9",
"@types/js-yaml": "^4.0.5",
"react": "17.0.2",
"react-dom": "17.0.2",
"typescript": "4.4.4"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
// @ts-ignore
import App from './App';

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root'),
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function add(a: number, b: number): number {
return a + b;
}
Loading

0 comments on commit 322aca1

Please sign in to comment.