Skip to content

Commit 62dda56

Browse files
committed
chore: deprecate; migrate to r5n.es-js-snippets
1 parent 7db2269 commit 62dda56

7 files changed

Lines changed: 103 additions & 1751 deletions

File tree

.vscodeignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,21 @@
55
.vscode/**
66
docs/**
77
src/**
8+
9+
# package manager / lockfiles
10+
bun.lock
11+
bun.lockb
12+
yarn.lock
13+
package-lock.json
14+
node_modules/**
15+
16+
# linter / build configs not needed at runtime
17+
.eslintrc.js
18+
.eslintrc.cjs
19+
.eslintignore
20+
.prettierrc
21+
.prettierrc.*
22+
.editorconfig
23+
24+
# build artifacts
25+
*.vsix

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All info about changes
44

55
# Released
66

7+
[4.4.4] - 2026-04-28
8+
9+
- **DEPRECATED**: this listing has been migrated to [`r5n.es-js-snippets`](https://marketplace.visualstudio.com/items?itemName=r5n.es-js-snippets) on the VS Code Marketplace and [`r5n/es-js-snippets`](https://open-vsx.org/extension/r5n/es-js-snippets) on Open VSX.
10+
- Adds a one-time migration notice on activation, with a follow-up reminder after 7 days. Both can be dismissed permanently.
11+
- This is the **final release on this listing**. No further fixes or features will land here. The new package contains React 17–19 support, React Router v6, Redux Toolkit / RTK Query snippets, performance fixes for large workspaces, and an updated build toolchain (bun + oxc).
12+
713
[4.4.0] - 2020-12-18
814

915
- Enable extension after startup finish to respect and parse snippets on settings change

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
# VS Code ES7+ React/Redux/React-Native/JS snippets
22

3+
> # ⚠️ This extension has moved
4+
>
5+
> Active development continues at **[r5n.es-js-snippets](https://marketplace.visualstudio.com/items?itemName=r5n.es-js-snippets)** (VS Code Marketplace) and **[r5n/es-js-snippets](https://open-vsx.org/extension/r5n/es-js-snippets)** (Open VSX). The new package brings React 17–19 support, React Router v6, Redux Toolkit / RTK Query snippets, performance fixes, and ongoing maintenance.
6+
>
7+
> ### Switch in 5 seconds
8+
>
9+
> 1. Install the new extension:
10+
> ```shell
11+
> ext install r5n.es-js-snippets
12+
> ```
13+
> 2. Uninstall this extension to avoid duplicate snippet suggestions.
14+
>
15+
> **This listing will not receive further updates.**
16+
17+
---
18+
319
JavaScript and React/Redux snippets in ES7+ with Babel plugin features for [VS Code](https://code.visualstudio.com/)
420
521
## Installation
622
23+
> 🛑 **You probably want the new listing instead** → [r5n.es-js-snippets](https://marketplace.visualstudio.com/items?itemName=r5n.es-js-snippets). The instructions below install the deprecated version.
24+
725
### Visual Studio Marketplace
826
927
Launch _Quick Open_:

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "es7-react-js-snippets",
33
"displayName": "ES7+ React/Redux/React-Native snippets",
4-
"description": "Extensions for React, React-Native and Redux in JS/TS with ES7+ syntax. Customizable. Built-in integration with prettier.",
5-
"version": "4.4.3",
4+
"description": "[DEPRECATED — install r5n.es-js-snippets] Extensions for React, React-Native and Redux in JS/TS with ES7+ syntax. Customizable. Built-in integration with prettier.",
5+
"version": "4.4.4",
66
"publisher": "dsznajder",
77
"icon": "images/logo.png",
88
"browser": "./lib/index.js",
@@ -20,7 +20,7 @@
2020
"license": "MIT",
2121
"repository": {
2222
"type": "git",
23-
"url": "https://github.com/r5n-labs/vscode-es7-javascript-react-snippets"
23+
"url": "https://github.com/r5n-labs/vscode-react-javascript-snippets"
2424
},
2525
"engines": {
2626
"vscode": "^1.60.0"
@@ -115,7 +115,7 @@
115115
]
116116
},
117117
"scripts": {
118-
"vscode:prepublish": "yarn compile",
118+
"vscode:prepublish": "bun run compile",
119119
"compile": "rm -rf lib; tsc -p ./ --noEmit false --module commonjs --outDir lib",
120120
"compile:dev": "rm -rf lib; tsc -p ./ --noEmit false --module commonjs --outDir lib",
121121
"lint": "eslint --ext .js,.ts,.tsx ./src/",

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88

99
import generateSnippets from './helpers/generateSnippets';
1010
import snippetSearch from './helpers/snippetSearch';
11+
import { showMigrationNotice } from './migration';
1112
import generatedSnippets from './snippets/generated.json';
1213

1314
const showRestartMessage = async ({
@@ -32,6 +33,8 @@ const showRestartMessage = async ({
3233
};
3334

3435
export async function activate(context: ExtensionContext) {
36+
void showMigrationNotice(context);
37+
3538
workspace.onDidChangeConfiguration(showRestartMessage);
3639
if (JSON.stringify(generatedSnippets).length < 10) {
3740
await generateSnippets();

src/migration.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import { env, ExtensionContext, Uri, window } from 'vscode';
2+
3+
const FIRST_SHOWN_KEY = 'r5n.migrated.firstShownAt';
4+
const DISMISSED_KEY = 'r5n.migrated.dismissed';
5+
const NEW_EXTENSION_ID = 'r5n.es-js-snippets';
6+
const REMINDER_AFTER_MS = 7 * 24 * 60 * 60 * 1000;
7+
8+
const INITIAL_MESSAGE =
9+
'ES7+ React/Redux/React-Native snippets has moved. Install the new version (r5n.es-js-snippets) for React 17–19 support and ongoing updates.';
10+
11+
const FINAL_MESSAGE =
12+
'Final reminder: this extension has moved to r5n.es-js-snippets and is no longer maintained here.';
13+
14+
export async function showMigrationNotice(
15+
context: ExtensionContext,
16+
): Promise<void> {
17+
if (context.globalState.get(DISMISSED_KEY) === true) return;
18+
19+
const now = Date.now();
20+
const firstShownAt = context.globalState.get<number>(FIRST_SHOWN_KEY);
21+
22+
if (firstShownAt === undefined) {
23+
await context.globalState.update(FIRST_SHOWN_KEY, now);
24+
await showToast(context, INITIAL_MESSAGE, false);
25+
return;
26+
}
27+
28+
if (now - firstShownAt >= REMINDER_AFTER_MS) {
29+
await showToast(context, FINAL_MESSAGE, true);
30+
await context.globalState.update(DISMISSED_KEY, true);
31+
}
32+
}
33+
34+
async function showToast(
35+
context: ExtensionContext,
36+
message: string,
37+
finalNudge: boolean,
38+
): Promise<void> {
39+
const action = await window.showInformationMessage(
40+
message,
41+
'Install new version',
42+
"Don't show again",
43+
);
44+
45+
if (action === 'Install new version') {
46+
await env.openExternal(Uri.parse(`vscode:extension/${NEW_EXTENSION_ID}`));
47+
await context.globalState.update(DISMISSED_KEY, true);
48+
return;
49+
}
50+
51+
if (action === "Don't show again" || finalNudge) {
52+
await context.globalState.update(DISMISSED_KEY, true);
53+
}
54+
}

0 commit comments

Comments
 (0)