-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: revert a recent PR that made the draggable attribute conditional (…
…#3379) * fix: revert a recent PR that made the draggable attribute conditional * chore: cut semver * docs: add a step to remove .jsx extension from example code * chore: update semver
- Loading branch information
1 parent
89aa31d
commit fa20dc8
Showing
4 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
releases: | ||
react-dnd-html5-backend: patch | ||
react-dnd-examples: patch | ||
|
||
declined: | ||
- react-dnd-documentation | ||
- test-suite-cra | ||
- test-suite-vite | ||
- react-dnd-test-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* eslint-disable */ | ||
import fs from 'fs/promises' | ||
import path from 'path' | ||
|
||
const pathArg = process.argv[2] | ||
console.log("process path ", pathArg) | ||
|
||
async function processDir(dir) { | ||
const entries = await fs.readdir(dir) | ||
for (const entry of entries) { | ||
const entryPath = path.join(dir, entry) | ||
const stat = await fs.stat(entryPath) | ||
if (stat.isDirectory()) { | ||
await processDir(entryPath) | ||
} else { | ||
if (entryPath.endsWith('.jsx')) { | ||
await jsx2jsName(entryPath) | ||
} | ||
} | ||
} | ||
} | ||
|
||
function jsx2jsName(entryPath) { | ||
const newPath = entryPath.replace('.jsx', '.js') | ||
console.log(`${entryPath} => ${newPath}`) | ||
return fs.rename(entryPath, newPath) | ||
} | ||
|
||
if (!pathArg) { | ||
throw new Error('arg must be defined') | ||
} | ||
await processDir(pathArg) |