-
Notifications
You must be signed in to change notification settings - Fork 997
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
Move framework-tools deps to root package.json #3908
Changes from all commits
2b5767c
97fd43d
6e1e76d
858accd
5e862f3
9335bae
25428b0
25e17bd
0e4e17e
e7a134d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,19 +23,23 @@ | |
"@types/jscodeshift": "0.11.2", | ||
"@types/lodash.template": "4", | ||
"all-contributors-cli": "6.20.0", | ||
"ansi-colors": "4.1.1", | ||
"babel-jest": "27.3.1", | ||
"babel-plugin-auto-import": "1.1.0", | ||
"babel-plugin-remove-code": "0.0.6", | ||
"core-js": "3.20.0", | ||
"eslint": "8.4.1", | ||
"fast-glob": "3.2.7", | ||
"jest": "27.3.1", | ||
"jscodeshift": "0.13.0", | ||
"lerna": "4.0.0", | ||
"lodash.template": "4.5.0", | ||
"nodemon": "2.0.15", | ||
"npm-packlist": "3.0.0", | ||
"octokit": "1.7.1", | ||
"ora": "5.4.1", | ||
"rimraf": "3.0.2", | ||
"terminal-link": "2.1.1", | ||
"typescript": "4.5.2", | ||
"typescript-transform-paths": "3.3.1" | ||
}, | ||
|
@@ -51,7 +55,6 @@ | |
"vscode-languageserver-textdocument": "1.0.3" | ||
}, | ||
"scripts": { | ||
"framework": "yarn ./tasks/framework-tools", | ||
"build": "yarn build:js && yarn build:types", | ||
"build:js": "lerna run build:js", | ||
"build:types": "tsc --build --verbose", | ||
|
@@ -62,11 +65,13 @@ | |
"clean:prisma": "rimraf node_modules/.prisma/client && node node_modules/@prisma/client/scripts/postinstall.js", | ||
"lint": "RWJS_CWD=packages/create-redwood-app/template eslint --config .eslintrc.js packages", | ||
"lint:fix": "yarn lint --fix", | ||
"postinstall": "yarn framework install", | ||
"build:link": "node ./tasks/build-and-copy", | ||
"build:test-project": "node ./tasks/test-project/test-project", | ||
"release-notes": "node ./tasks/release-notes/release-notes.mjs", | ||
"publish:canary": "lerna publish --force-publish --canary --include-merged-tags --preid canary --dist-tag canary --yes --loglevel verbose" | ||
"publish:canary": "lerna publish --force-publish --canary --include-merged-tags --preid canary --dist-tag canary --yes --loglevel verbose", | ||
"project:deps": "node ./tasks/framework-tools/frameworkDepsToProject.mjs", | ||
"project:copy": "node ./tasks/framework-tools/frameworkFilesToProject.mjs", | ||
"project:sync": "node ./tasks/framework-tools/frameworkSyncToProject.mjs" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
/* eslint-env node */ | ||
|
||
import fs from 'fs' | ||
import path from 'path' | ||
import { dirname } from 'path' | ||
import { fileURLToPath } from 'url' | ||
|
||
import c from 'ansi-colors' | ||
import execa from 'execa' | ||
import fg from 'fast-glob' | ||
import fs from 'node:fs' | ||
import path from 'node:path' | ||
import url from 'node:url' | ||
import packlist from 'npm-packlist' | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)) | ||
const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) | ||
|
||
export const REDWOOD_PACKAGES_PATH = path.resolve( | ||
__dirname, | ||
'../../../../packages' | ||
'../../../packages' | ||
) | ||
|
||
/** | ||
|
@@ -34,7 +33,7 @@ export function frameworkPkgJsonFiles() { | |
} | ||
|
||
/** | ||
* The dependencenies used by `@redwoodjs` packages. | ||
* The dependencies used by `@redwoodjs` packages. | ||
*/ | ||
export function frameworkDependencies(packages = frameworkPkgJsonFiles()) { | ||
const dependencies = {} | ||
|
@@ -152,7 +151,7 @@ export function cleanPackages(packages = frameworkPkgJsonFiles()) { | |
{ | ||
shell: true, | ||
stdio: 'inherit', | ||
cwd: path.resolve(__dirname, '../../../../'), | ||
cwd: path.resolve(__dirname, '../../../'), | ||
dac09 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
) | ||
} | ||
|
@@ -170,15 +169,15 @@ export function buildPackages(packages = frameworkPkgJsonFiles()) { | |
{ | ||
shell: true, | ||
stdio: 'inherit', | ||
cwd: path.resolve(__dirname, '../../../../'), | ||
cwd: path.resolve(__dirname, '../../../'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, not sure why this path has changed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did move it actually; the filepath used to be |
||
} | ||
) | ||
|
||
// Build all TypeScript. | ||
execa.sync('yarn build:types', undefined, { | ||
shell: true, | ||
stdio: 'inherit', | ||
cwd: path.resolve(__dirname, '../../../../'), | ||
cwd: path.resolve(__dirname, '../../../'), | ||
}) | ||
} | ||
|
||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you doing this here? I'm confused... why is this necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the node protocol. It's just a new feature in ES Modules: https://nodejs.org/api/esm.html#node-imports. There's no meaningful difference; the only justification I have is
The Node.js docs will most likely use it in the future too: nodejs/node#38343.
Can remove it though; just added it cause I liked it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. Keep us moving in that direction, k? My only concern would be using features that aren't supported in v16 (i.e. > 16 only).