![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@npmcli/template-oss
Advanced tools
This module bundles the npm CLI team's basics for package development into a single devDependency.
CAUTION: THESE CHANGES WILL OVERWRITE ANY LOCAL FILES AND SETTINGS
Configure the use of template-oss
in the root package.json
.
{
name: 'my-package',
// ...
templateOSS: {
// copy repo specific files for the root pkg
applyRootRepoFiles: true,
// modify package.json and copy module specific files for the root pkg
applyRootModuleFiles: true,
// copy repo files for each whitelisted workspaces
applyWorkspaceRepoFiles: true,
// whitelist workspace by package name to modify package.json
// and copy module files
workspaces: ['workspace-package-name'],
version: '2.3.1'
}
}
### `package.json` patches
These fields will be set in the project's `package.json`:
```js
{
author: 'GitHub Inc.',
files: ['bin', 'lib'],
license: 'ISC',
templateVersion: $TEMPLATE_VERSION,
scripts: {
lint: `eslint '**/*.js'`,
postlint: 'npm-template-check',
lintfix: 'npm run lint -- --fix',
'template-copy': 'npm-template-copy --force',
preversion: 'npm test',
postversion: 'npm publish',
prepublishOnly: 'git push origin --follow-tags',
snap: 'tap',
test: 'tap',
posttest: 'npm run lint',
},
engines: {
node: '^12.13.0 || ^14.15.0 || >=16',
},
}
The "templateVersion"
field will be set to the version of this package being
installed. This is used to determine if the postinstall script should take any
action.
The changes
constant located in lib/postinstall/update-package.js
should contain
all patches for the package.json
file. Be sure to correctly expand any object/array
based values with the original package content.
Any existing .eslintrc.*
files will be removed, unless they also match the
pattern .eslintrc.local.*
These files will be copied, overwriting any existing files:
.eslintrc.js
.github/workflows/ci.yml
.github/ISSUE_TEMPLATE/bug.yml
.github/ISSUE_TEMPLATE/config.yml
.github/CODEOWNERS
.gitignore
LICENSE.md
SECURITY.md
Currently, the only dynamic file generated is a github workflow for a given workspace.
.github/workflows/ci-$$package-name$$.yml
Place files in the lib/content/
directory, use only the file name and remove
any leading .
characters (i.e. .github/workflows/ci.yml
becomes ci.yml
and .gitignore
becomes gitignore
).
Modify the repoFiles
and moduleFiles
objects at the top of lib/postinstall/copy-content.js
to include
your new file. The object keys are destination paths, and values are source.
package.json
checksnpm-template-check
is run by postlint
and will error if the package.json
is not configured properly, with steps to run to correct any problems.
Template files will be copied automatically when template-oss
is updated.
You can force an update with npm run template-copy
.
Add any unwanted packages to unwantedPackages
in lib/check.js
. Currently
the best way to install any packages is to include them as peerDependencies
in this repo.
FAQs
templated files used in npm CLI team oss projects
The npm package @npmcli/template-oss receives a total of 661 weekly downloads. As such, @npmcli/template-oss popularity was classified as not popular.
We found that @npmcli/template-oss demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.