Skip to content

Commit

Permalink
Fix spell
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Feb 3, 2022
1 parent cacd1aa commit 4717a74
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ coverage/
/website/static/lib/
/website/static/playground.js
.nyc_output
vendors/
8 changes: 4 additions & 4 deletions scripts/vendors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Currently, Prettier is developed using CommonJS Modules. This is for historical

However, migrating to ECMAScript Modules is not an easy task.

While we are working on it, several important packages are being migrated to Pure ESM. Please see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c from [@sindresorhus](https://github.com/sindresorhus) about Pure ESM Pacakges.
While we are working on it, several important packages are being migrated to Pure ESM. Please see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c from [@sindresorhus](https://github.com/sindresorhus) about Pure ESM Packages.

It would be a problem if Prettier could not use the new Pure ESM Package until we have completed that work.

Expand All @@ -30,15 +30,15 @@ This script do the following 4 things:

**1. Bundle ESM Packages to CommonJS**

This bundles listed packages in `verndors.mjs` into `/vendors/*.js` as CommonJS.
This bundles listed packages in `vendors.mjs` into `/vendors/*.js` as CommonJS.

**2. Update `package.json`**

This updates [`"imports"` in `package.json`](https://nodejs.org/api/packages.html#imports) to enables aliases to resolve pacakges put in `/vendors/*.js`.
This updates [`"imports"` in `package.json`](https://nodejs.org/api/packages.html#imports) to enables aliases to resolve packages put in `/vendors/*.js`.

**3. Lock ESM Packages version to `vendor-versions.json`**

This locks versions of pacakges that is bundled to `vendor-versions.json`. It is used to validate by `validate-vendor-versions.mjs`.
This locks versions of packages that is bundled to `vendor-versions.json`. It is used to validate by `validate-vendor-versions.mjs`.

**4. Generate `/vendors/types.d.ts`**

Expand Down
4 changes: 2 additions & 2 deletions scripts/vendors/validate-vendor-versions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ const { require } = createEsmUtils(import.meta);

async function main() {
const errors = [];
const verndorVersions = await getVendorVersions();
const vendorVersions = await getVendorVersions();
for (const vendor of vendors) {
const { packageJson: vendorPackage } = await readPackageUp({
cwd: require.resolve(vendor),
});
const vendorPackageVersion = vendorPackage.version;
const lockedVersion = verndorVersions[vendor];
const lockedVersion = vendorVersions[vendor];
if (vendorPackageVersion !== lockedVersion) {
errors.push({
oldVersion: lockedVersion,
Expand Down

0 comments on commit 4717a74

Please sign in to comment.